core
v2.0.1AdonisJS is a TypeScript-first web framework for building web apps and API servers. It comes with su core, typescript, core, framework, mvc-framework.
Installation
Please help me install the skill `core` from SkillHub official store.
npx skills add xueyetianya/core
Core
Multi-purpose utility tool for managing data entries, searching, exporting, and running general-purpose tasks from the command line.
Commands
| Command | Description |
|---|---|
run |
Execute the main function with given arguments |
config |
View or edit configuration (stored in config.json) |
status |
Show current status (ready / not ready) |
init |
Initialize the data directory and setup |
list |
List all entries from the data log |
add |
Add a new timestamped entry to the data log |
remove |
Remove an entry by identifier |
search |
Search entries by keyword (case-insensitive) |
export |
Export all data log contents to stdout |
info |
Show version and data directory info |
help |
Show help and list all commands |
version |
Print current version |
Usage
core <command> [args]
All actions are logged to $DATA_DIR/history.log for auditing.
Data Storage
- Default directory:
~/.local/share/core/ - Override: Set the
CORE_DIRenvironment variable to change the data directory. - Files:
history.log— timestamped log of every command executeddata.log— persistent data store foradd,list,search, andexportcommandsconfig.json— configuration file (created byconfig)
Requirements
- Bash 4+ (uses
set -euo pipefail) grep(for thesearchcommand)- No external dependencies or API keys required
- Works on Linux, macOS, and WSL
When to Use
- Tracking items or tasks — Use
core add "buy groceries"to log timestamped entries, thencore listto review them all. - Quick data lookups — Run
core search "keyword"to find entries matching a keyword across your data log. - Exporting data for other tools — Use
core export > data.csvto pipe all stored data into a file for processing with other scripts. - Running ad-hoc tasks — Execute
core run "task-name"for general-purpose task execution with automatic logging. - Checking system readiness — Run
core statusto verify the tool is initialized and ready, orcore infoto see version and directory details.
Examples
# Initialize core in the default data directory
core init
# Add a new entry
core add "Deploy v2.1 to production"
# List all entries
core list
# Search for entries containing "deploy"
core search deploy
# Export all data
core export > backup.txt
# Run a task
core run "nightly-backup"
# Check status
core status
# View configuration
core config
# Show version and data directory info
core info
# Remove an entry
core remove "old-entry"
Output
All command output goes to stdout. Redirect to a file if needed:
core list > entries.txt
core export > full-export.txt
Configuration
Set CORE_DIR to customize where data is stored:
export CORE_DIR=/path/to/custom/dir
Powered by BytesAgain | bytesagain.com | [email protected]