clqn-cli 0.1.0 → 0.1.2

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.
Files changed (3) hide show
  1. package/README.md +66 -91
  2. package/clqn.mjs +10831 -10223
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -3,166 +3,141 @@
3
3
  <img src="docs/assets/header.gif" width="1032" alt="clqn">
4
4
  </picture>
5
5
 
6
- [clqn.org](https://clqn.org/) · [Download](https://clqn.org/download.html) · [Documentation](https://clqn.org/docs/)
6
+ <p align="center">
7
+ <a href="https://clqn.org/">clqn.org</a> · <a href="https://clqn.org/download.html">Download</a> · <a href="https://clqn.org/docs/">Documentation</a>
8
+ </p>
7
9
 
10
+ <p align="center">
8
11
  <a href="https://github.com/rli8145/clqn/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/rli8145/clqn/ci.yml?branch=main&style=for-the-badge" alt="Build status"></a>
9
12
  <img src="https://img.shields.io/badge/node-%3E%3D22-339933?style=for-the-badge&logo=node.js&logoColor=white" alt="Node.js 22 or newer">
13
+ <a href="https://npmjs.com/package/clqn-cli"><img src="https://img.shields.io/npm/v/clqn-cli?style=for-the-badge" alt="npm version"></a>
10
14
  <a href="LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge" alt="MIT license"></a>
15
+ </p>
16
+
17
+ ## Why clqn?
11
18
 
12
19
  Collaborating on long-horizon development tasks can get complicated quickly. Bloated context, merge conflicts, and unclear task ownership are common, especially when each collaborator works with several agents.
13
20
 
14
- Existing solutions introduce a lot of setup overhead. `clqn` is an extra lightweight CLI for people and their own AI agents to quickly share context, assign tasks, message one another, and coordinate work. Each collaborator runs their own agents, which connect to clqn through MCP.
21
+ Existing solutions introduce a lot of setup overhead. `clqn` is an extra lightweight CLI for people and their own AI agents to easily coordinate work.
22
+
23
+ `clqn` stands for **clan**. Each clan has a **leader** who invites members and registers an orchestrator agent. **Members** (and the leader) register worker agents.
15
24
 
16
- `clqn` stands for **clan**. Each clan has a **leader** who invites members and registers the orchestrator. **Members** register their own worker agents.
25
+ <picture>
26
+ <source media="(prefers-reduced-motion: reduce)" srcset="docs/assets/demo.png">
27
+ <img src="docs/assets/demo.gif" width="1032" alt="Terminal demo: an orchestrator assigns a task, a worker starts it in its own worktree and submits a pull request, and the orchestrator checks and merges it.">
28
+ </picture>
17
29
 
18
30
  ## Installation
19
31
 
20
- Homebrew is the primary install route and manages Node.js for you. Code workflows also need Git and an authenticated GitHub CLI (`gh`).
32
+ Install with npm (Node.js 22+):
21
33
 
22
34
  ```sh
23
- brew tap rli8145/clqn https://github.com/rli8145/clqn
24
- brew install clqn
35
+ npm install -g clqn-cli
25
36
  clqn --help
26
37
  ```
27
38
 
28
- The CLI includes the local MCP server for Codex, Claude Code, and other MCP clients. No separate MCP package is needed.
29
-
30
- ### npm alternative
31
-
32
- With Node.js 22+, install from npm:
39
+ Alternatively, install with Homebrew:
33
40
 
34
41
  ```sh
35
- npm install -g clqn-cli
42
+ brew tap rli8145/clqn https://github.com/rli8145/clqn
43
+ brew install clqn
36
44
  ```
37
45
 
38
- ### Build from source
46
+ ### Try it locally
39
47
 
40
- For development, use Node.js 22+ and npm 10+:
48
+ With Docker, run a private API from a clone of this repository and sign in to it:
41
49
 
42
50
  ```sh
43
- git clone https://github.com/rli8145/clqn.git
44
- cd clqn
45
- npm ci
46
- npm run build
47
- npm link --workspace @clqn/cli
48
- clqn --help
51
+ git clone https://github.com/rli8145/clqn && cd clqn
52
+ docker compose --profile server up --build -d --wait
53
+ docker compose exec api node packages/api/dist/manage-user.js create you@example.com # prints a one-time token
54
+ export CLQN_API_URL=http://127.0.0.1:8080
55
+ printf '%s' '<token>' | clqn login
56
+ clqn init "My project"
49
57
  ```
50
58
 
51
- This puts `clqn` on your `PATH`. Update a Homebrew installation with `brew upgrade clqn`. For a source installation, run `git pull`, `npm ci`, and `npm run build` in your clone.
59
+ See [hosting](docs/hosting.md) to share it with teammates over HTTPS.
52
60
 
53
- ### Sign in
61
+ ## Usage
54
62
 
55
- Replace `<operator-api-url>` with the HTTPS URL supplied by your clan operator, then log in.
63
+ ### 1. Sign in and create a clan
64
+
65
+ Use the API URL from your clan operator, or [self-host one with Docker Compose](docs/hosting.md#self-host-with-docker-compose) in one command.
56
66
 
57
67
  ```sh
58
68
  export CLQN_API_URL="<operator-api-url>"
59
69
  clqn login --github
60
- # Or use an operator-provisioned token:
61
- clqn login < /secure/path/to/personal-token
70
+ clqn init "My project"
71
+ clqn invite teammate@example.com
62
72
  ```
63
73
 
64
- GitHub login requires the operator to [configure an OAuth App](docs/authentication.md#operator-setup). It requests email identity access only, never repository access.
74
+ Invited? Sign in and run `clqn join <invite-code>`.
65
75
 
66
- ## Create or join a clan
76
+ ### 2. Connect your agents
67
77
 
68
- ```sh
69
- clqn init "My project"
70
- clqn invite bob@example.com
78
+ The leader registers the orchestrator (optional but recommended). Otherwise, the leader supervises worker agents manually. A strong reasoning model is recommended for the orchestrator. Each member registers their own workers.
71
79
 
72
- # Bob logs in with his own token, then joins.
73
- clqn join <invite-code>
80
+ ```sh
81
+ clqn agent add Coordinator --orchestrator
82
+ clqn agent add codex
74
83
  ```
75
84
 
76
- ## Connect agents
77
-
78
- ```sh
79
- # Leader: register the clan's orchestrator.
80
- clqn agent add Coordinator --orchestrator --json
85
+ Connect each agent to MCP using its returned token: [agent setup](docs/index.md#connect-an-agent).
81
86
 
82
- # Each member: register a worker.
83
- clqn agent add Codex --json
84
- ```
87
+ Save token limits, allowed models, and approval preferences for your agents. These are recorded for the clan but [not enforced yet](docs/policies.md):
85
88
 
86
- Each returns an agent token shown once. Save it privately and use it in that agent's MCP configuration. Set `CLQN_CLAN_ID` to the clan ID printed by `clqn init` or `clqn join`, or listed by `clqn clans`:
87
-
88
- ```json
89
- {
90
- "mcpServers": {
91
- "clqn": {
92
- "command": "clqn",
93
- "args": ["mcp", "--path", "/absolute/path/to/project"],
94
- "env": {
95
- "CLQN_API_URL": "<operator-api-url>",
96
- "CLQN_TOKEN": "<agent-token>",
97
- "CLQN_CLAN_ID": "<clan-id>"
98
- }
99
- }
100
- }
101
- }
89
+ ```sh
90
+ clqn limits --tokens 100000 --models provider/model --control approve
102
91
  ```
103
92
 
104
- ## Share context
93
+ ### 3. Share context and coordinate work
105
94
 
106
95
  ```sh
107
96
  printf 'Run npm test before committing.\n' | clqn context write conventions --expected-revision 0
108
97
  clqn context read conventions
109
- clqn context history conventions
110
98
  ```
111
99
 
112
- ## Coordinate work
113
-
114
- Code tasks use isolated Git worktrees so agents can work in parallel, with GitHub PRs for review and merging.
115
-
116
- Run from the project clone, using each agent's credentials in its session:
100
+ For code tasks, run from your project clone with Git and an authenticated GitHub CLI (`gh`). Each agent uses its own credentials.
117
101
 
118
102
  ```sh
119
- # Orchestrator: create and assign.
120
- clqn task add "Review the API contract" --code
121
- clqn task assign <task-id> --agent <worker-agent-id>
103
+ # Orchestrator
104
+ clqn task add login-fix --code
105
+ clqn task assign login-fix --agent codex
122
106
 
123
- # Assigned worker: open a worktree, work, commit, and submit a PR.
124
- clqn task start <task-id>
107
+ # Worker
108
+ clqn task start login-fix
125
109
  cd <printed-worktree-path>
126
110
  # Make changes, test, and commit.
127
- clqn task submit <task-id>
111
+ clqn task submit login-fix
128
112
 
129
- # Orchestrator: verify checks and merge.
130
- clqn task check <task-id>
131
- clqn task merge <task-id>
113
+ # Orchestrator
114
+ clqn task check login-fix
115
+ clqn task merge login-fix
132
116
 
133
- # Task owner: complete after integration.
134
- clqn task done <task-id>
117
+ # Worker
118
+ clqn task done login-fix
135
119
  ```
136
120
 
137
- `--code` selects origin/main and a unique branch (omit for non-code tasks).
121
+ As the leader, run `clqn repo link` once to set up the [GitHub webhook](docs/webhooks.md#link-a-repository). While MCP is connected, changes to the default branch on origin automatically update clean local checkouts of it.
138
122
 
139
- ## Sync main
123
+ Use `--alias` if you want a longer agent name or task description with a separate short name. See [custom aliases](docs/commands.md#custom-aliases).
140
124
 
141
- ```sh
142
- # Leader: configure the GitHub webhook once per repository/clan.
143
- clqn repo link
144
- ```
145
-
146
- Linking requires repository admin access and a [configured HTTPS API](docs/webhooks.md#server-setup). While the project MCP connection is active, main sync runs automatically. It fetches at startup, after main-change notifications, and on a five-minute fallback. A clean main worktree fast-forwards; task branches stay pinned. Set the project path in the MCP configuration above.
147
-
148
- ## Limits and activity
125
+ ### 4. Follow progress
149
126
 
150
127
  ```sh
151
- clqn limits --tokens 100000 --models provider/model --control approve
152
- clqn limits # Saved preferences; limits and approvals are not enforced yet.
153
- clqn status # Workspace counts and task distribution.
154
- clqn log # Latest 10 clan activity events, newest first.
128
+ clqn status
129
+ clqn log
155
130
  ```
156
131
 
157
- Add `--json` for scripting.
132
+ Use `clqn --help` to explore all commands. Add `--json` for scripting.
158
133
 
159
134
  ## Documentation
160
135
 
161
136
  - [Commands](docs/commands.md)
162
137
  - [Repository workflow](docs/repositories.md) · [GitHub notifications](docs/webhooks.md)
163
138
  - [Authentication](docs/authentication.md) · [Agent policies](docs/policies.md)
164
- - [Database setup](docs/database.md) · [GCP hosting](docs/hosting.md)
165
- - [Architecture and roadmap](PLAN.md)
139
+ - [Database setup](docs/database.md) · [Hosting](docs/hosting.md)
140
+ - [Architecture and roadmap](ROADMAP.md)
166
141
 
167
142
  ## Contributing
168
143