@hagicode/cli 0.1.0-dev.24.1.572a2e7 → 0.1.0-dev.26.1.e4223c6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -67
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,18 +5,16 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/@hagicode/cli)
|
|
6
6
|
[](https://nodejs.org/)
|
|
7
7
|
|
|
8
|
-
`@hagicode/cli` provides the published `hagi` command
|
|
9
|
-
The same repository also carries the canonical embedded Hagi skill under [`skills/`](skills/), so package usage and AI-oriented guidance live in one writable source.
|
|
8
|
+
`@hagicode/cli` provides the published `hagi` command, which lets you drive a HagiCode backend from a terminal, scripts, or an AI agent without opening the app. Manage projects, proposals (generate, execute, archive, and send), vaults and their files, chat sessions, AutoTasks, scheduled plans, and skills (local list and uninstall, gallery search and install, and trusted providers). Every command supports a shared `--json` output for scripting, and an embedded Hagi skill under [`skills/`](skills/) guides agent workflows.
|
|
10
9
|
|
|
11
10
|
## Requirements
|
|
12
11
|
|
|
13
12
|
- Node.js 24+
|
|
14
|
-
- npm compatible with `10.9.2`
|
|
15
13
|
- Access to a HagiCode backend API
|
|
16
14
|
|
|
17
15
|
## Installation
|
|
18
16
|
|
|
19
|
-
Use the published npm package for normal CLI usage. You do not need to clone
|
|
17
|
+
Use the published npm package for normal CLI usage. You do not need to clone this repository to run `hagi`.
|
|
20
18
|
|
|
21
19
|
### Zero-install usage
|
|
22
20
|
|
|
@@ -58,12 +56,9 @@ If you are integrating Hagi CLI into an agent workflow, start from the embedded
|
|
|
58
56
|
|
|
59
57
|
- [`skills/README.md`](skills/README.md) - repository-level discovery entrypoint
|
|
60
58
|
- [`skills/hagi/SKILL.md`](skills/hagi/SKILL.md) - canonical Hagi skill contract
|
|
61
|
-
- [`skills/hagi/references/`](skills/hagi/references/) - focused package usage, proposal flow, maintainer, and validation guidance
|
|
59
|
+
- [`skills/hagi/references/`](skills/hagi/references/) - focused package usage, session data, proposal flow, maintainer, and validation guidance
|
|
62
60
|
|
|
63
|
-
|
|
64
|
-
`repos/skills/**` remains a historical/reference-only mirror during this consolidation.
|
|
65
|
-
|
|
66
|
-
Repository-local `npm run dev -- ...` and `node ./dist/cli.js ...` commands stay in the maintainer section below.
|
|
61
|
+
The same folder is also shipped as the HagiCode server's built-in skill `hagi`, so an agent running inside a HagiCode session can answer questions about the user's own projects, proposals, sessions, vaults and plans without setup. Edit `skills/hagi/` here; the built-in copy is recopied from it.
|
|
67
62
|
|
|
68
63
|
## Shared Runtime Flags
|
|
69
64
|
|
|
@@ -488,50 +483,6 @@ hagi skills trusted delete --provider-id example-provider
|
|
|
488
483
|
hagi skills trusted reset
|
|
489
484
|
```
|
|
490
485
|
|
|
491
|
-
## Maintainer Workflow (`repos/cli` only)
|
|
492
|
-
|
|
493
|
-
Use the commands in this section only when you are editing or validating the CLI source tree inside this repository.
|
|
494
|
-
Package consumers and automation should stay on `npx @hagicode/cli ...` or an installed `hagi ...` unless they are working on `repos/cli` itself.
|
|
495
|
-
|
|
496
|
-
Build the local repository output:
|
|
497
|
-
|
|
498
|
-
```bash
|
|
499
|
-
cd repos/cli
|
|
500
|
-
npm install
|
|
501
|
-
npm run build
|
|
502
|
-
node ./dist/cli.js --help
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
For local development without building:
|
|
506
|
-
|
|
507
|
-
```bash
|
|
508
|
-
cd repos/cli
|
|
509
|
-
npm run dev -- proposal list --json
|
|
510
|
-
npm run dev -- chat list --json
|
|
511
|
-
```
|
|
512
|
-
|
|
513
|
-
## Release Automation
|
|
514
|
-
|
|
515
|
-
`repos/cli/.github/workflows/release-draft-action.yml` maintains the next GitHub draft release for `@hagicode/cli` through `HagiCode-org/hagi-release-drafter@v0.1.2`, built from Conventional Commit messages since the latest `vX.Y.Z` tag. It runs on pushes to `main` and on manual dispatch. The optional `version` input overrides the derived version and accepts only a stable `X.Y.Z`. The draft title is `HagiCode CLI v{version}`. Only the draft job holds `contents: write`, and the workflow never publishes. Publishing the draft is a manual step in the GitHub UI, and that publish triggers `npm-publish.yml`.
|
|
516
|
-
`repos/cli/.github/workflows/npm-publish.yml` publishes two channels with GitHub Actions OIDC plus provenance:
|
|
517
|
-
|
|
518
|
-
- pushes to `main` publish a unique development prerelease under the npm `dev` dist-tag
|
|
519
|
-
- published GitHub Releases for strict `vX.Y.Z` tags publish the stable package under the npm `latest` dist-tag
|
|
520
|
-
|
|
521
|
-
### Local Release Verification
|
|
522
|
-
|
|
523
|
-
Run the stable release gates locally before publishing a GitHub Release:
|
|
524
|
-
|
|
525
|
-
```bash
|
|
526
|
-
cd repos/cli
|
|
527
|
-
version="$(npm run --silent publish:verify-release -- v0.1.0)"
|
|
528
|
-
npm version --no-git-tag-version "$version"
|
|
529
|
-
npm run build
|
|
530
|
-
npm run typecheck
|
|
531
|
-
npm test
|
|
532
|
-
npm run pack:check
|
|
533
|
-
```
|
|
534
|
-
|
|
535
486
|
## Environment Variables
|
|
536
487
|
|
|
537
488
|
The CLI resolves runtime settings centrally before every command. Explicit flags always override environment variables.
|
|
@@ -542,20 +493,6 @@ The CLI resolves runtime settings centrally before every command. Explicit flags
|
|
|
542
493
|
| `HAGI_API_TOKEN` | Bearer token attached as `Authorization: Bearer <token>`. |
|
|
543
494
|
| `HAGI_API_LANG` | Shared `Accept-Language` header value. |
|
|
544
495
|
|
|
545
|
-
## Generate the API Client
|
|
546
|
-
|
|
547
|
-
The CLI owns its own OpenAPI configuration in `openapi-ts.config.json`.
|
|
548
|
-
|
|
549
|
-
```bash
|
|
550
|
-
cd repos/cli
|
|
551
|
-
npm run generate:api
|
|
552
|
-
npm run generate:api:once
|
|
553
|
-
```
|
|
554
|
-
|
|
555
|
-
Default Swagger source:
|
|
556
|
-
|
|
557
|
-
- `http://127.0.0.1:35168/swagger/v1/swagger.json`
|
|
558
|
-
|
|
559
496
|
## Exit Codes
|
|
560
497
|
|
|
561
498
|
Stable non-zero exits used by the CLI:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hagicode/cli",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
3
|
+
"version": "0.1.0-dev.26.1.e4223c6",
|
|
4
4
|
"description": "HagiCode CLI for project, proposal, vault, chat, and AutoTask management.",
|
|
5
5
|
"homepage": "https://github.com/HagiCode-org/cli#readme",
|
|
6
6
|
"bugs": {
|