@linkage-open/cli
v0.1.2
Published
Command-line interface for interacting with Linkage.
Downloads
10
Readme
Linkage CLI
Command-line interface for interacting with Linkage.
Installation
bun install -g @linkage-open/cliOr use it directly in your project:
bun add -D @linkage-open/cliCommands
linkage init [dir]
Initialize a new Linkage project from the template.
Options:
-n, --name <name>- Repository name-m, --package-manager <packageManager>- Package manager to use (bun or npm)
Example:
linkage init my-project --name my-app --package-manager bunlinkage config set-api-key [key]
Store your Linkage API key in the config file (~/.linkage/config.json).
If the key is not provided as an argument, you will be prompted to enter it interactively.
Example:
# Interactive prompt
linkage config set-api-key
# Or provide the key directly
linkage config set-api-key your-api-key-herelinkage config remove-api-key
Remove the stored API key from the config file.
Example:
linkage config remove-api-keylinkage upload
Upload your Linkage project to the platform.
Options:
-k, --api-key <apiKey>- API key for authentication-p, --project-id <projectId>- Project ID to upload to
Example:
linkage upload --project-id your-project-idAPI Key Configuration
The CLI supports multiple ways to provide your API key, in order of priority:
- Command-line argument:
--api-key <key> - Environment variable:
LINKAGE_API_KEY - Config file:
~/.linkage/config.json(uselinkage config set-api-key)
This allows you to:
- Store your API key permanently with
linkage config set-api-key - Override it temporarily with an environment variable or CLI argument
- Keep different keys for different environments
Security Note
The config file is stored in your home directory (~/.linkage/config.json). Make sure to keep this file secure and never commit it to version control.
Development
Build the CLI:
bun run buildLink locally for development:
bun run dev