Skip to content

Commit 9914a19

Browse files
authored
Merge pull request #21 from osodevops/codex/bundled-keito-skill
Bundle Keito agent skill with CLI
2 parents c329f18 + 1d796f1 commit 9914a19

31 files changed

Lines changed: 2363 additions & 24 deletions

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/),
66
and this project adheres to [Semantic Versioning](https://semver.org/).
77

8+
## [0.1.7] - 2026-06-16
9+
10+
### Added
11+
12+
- Bundle the `keito-time-track` agent skill with the CLI so `keito skill install` no longer depends on an external skill repository by default.
13+
- Add a gstack-style `./setup` entrypoint for source-checkout installs with Claude Code and Codex target selection.
14+
- Add `keito skill team-init optional|required` to write repo-level agent guidance and `.keito/config.example.yml`.
15+
- Add packaged lifecycle hook tests that exercise the bundled skill with a fake Keito CLI.
16+
- Add AI-native services positioning notes for agent billing, project attribution, and client profitability.
17+
18+
### Changed
19+
20+
- Keep the audit-first external skill install path available through `--source` and `--skip-skills-add`.
21+
- Document the bundled skill install, repo setup workflow, and release positioning in README and the agent guide.
22+
- Accept `calendar` and `desktop` as time entry source values alongside `web`, `cli`, `api`, and `agent`.
23+
824
## [0.1.6] - 2026-05-12
925

1026
### Changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "keito-cli"
3-
version = "0.1.6"
3+
version = "0.1.7"
44
edition = "2021"
55
description = "AI agent time tracking CLI for Keito: capture billable human and agent work for client billing, agency projects, and AI-native services"
66
license = "MIT"

README.md

Lines changed: 130 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Track billable human and AI agent work in [Keito](https://keito.ai) from the ter
88

99
Keito is built for teams selling outcomes with people and AI agents. The CLI helps make that work visible for client billing, project profitability, time tracking, and invoice review.
1010

11+
Keito is billing and profitability infrastructure for AI-native services teams:
12+
agent work is recorded against the same clients, projects, tasks, and invoices
13+
as human work, with metadata for margin and audit analysis.
14+
1115
<p align="center">
1216
<img src="recordings/time-start-stop-optimised.gif" alt="keito demo" width="720" />
1317
</p>
@@ -110,14 +114,137 @@ Exit codes tell you exactly what happened — no need to parse error messages. S
110114

111115
## Agent Skill
112116

113-
The Keito Agent Skill is installed from the GitHub skill repo, not from an npm package:
117+
The Keito Agent Skill ships with this CLI. It brings Keito to the places where
118+
agents already work by installing lifecycle hooks for Claude Code and OpenAI
119+
Codex CLI, then recording one `source=agent` time entry when a tracked coding
120+
session ends.
121+
122+
### Requirements
123+
124+
- Claude Code and/or Codex CLI
125+
- Git, Bash, and `jq`
126+
- Keito credentials via `keito auth login` or `KEITO_API_KEY` +
127+
`KEITO_ACCOUNT_ID`
128+
- macOS/Linux: `./setup` can install the CLI through Homebrew or release
129+
tarballs if `keito` is not already on `PATH`
130+
- Windows: install the binary from
131+
[Releases](https://github.com/osodevops/keito-cli/releases) first, then run
132+
the skill commands from Git Bash or WSL where `bash` and `jq` are available
133+
134+
### Step 1: Install on your machine
135+
136+
Open Claude Code or Codex and paste this. The agent can run the same
137+
source-checkout flow that gstack documents:
138+
139+
```sh
140+
git clone --single-branch --depth 1 https://github.com/osodevops/keito-cli.git ~/.keito/keito-cli
141+
cd ~/.keito/keito-cli
142+
./setup
143+
```
144+
145+
`./setup` installs the CLI if needed, installs the bundled `keito-time-track`
146+
skill, and configures hooks for Claude Code, Codex, or both. In an interactive
147+
terminal it asks which host to configure. In non-interactive runs it defaults
148+
to both.
149+
150+
Target one host explicitly when needed:
151+
152+
```sh
153+
~/.keito/keito-cli/setup --host claude
154+
~/.keito/keito-cli/setup --host codex
155+
~/.keito/keito-cli/setup --host both
156+
```
157+
158+
If the CLI is already installed, this equivalent command uses the bundled skill
159+
without the source checkout:
114160

115161
```sh
116-
keito auth login
117162
keito skill install
118163
```
119164

120-
`keito skill install` uses `npx` only to run the open skills installer. The installer package is pinned to `skills@1.5.6` by default and can be overridden intentionally with `KEITO_SKILLS_PACKAGE`.
165+
Choose one target when needed:
166+
167+
```sh
168+
keito skill install --agent claude-code
169+
keito skill install --agent codex
170+
```
171+
172+
Check readiness:
173+
174+
```sh
175+
keito skill doctor
176+
keito skill status --json
177+
```
178+
179+
### Step 2: Configure each client repo
180+
181+
From each client repository, invoke the skill once to map that worktree to a
182+
Keito client, project, and task:
183+
184+
```text
185+
/track-time-keito
186+
```
187+
188+
This writes `.keito/config.yml`, which is intentionally repo-local and should
189+
not be committed.
190+
191+
### Team Mode
192+
193+
For shared repos, use the same model as gstack team mode: the skill remains
194+
globally installed, and the repository commits only agent guidance plus an
195+
example config.
196+
197+
From inside the shared repo:
198+
199+
```sh
200+
~/.keito/keito-cli/setup --team optional
201+
git add AGENTS.md CLAUDE.md .gitignore .keito/config.example.yml
202+
git commit -m "add Keito tracking guidance for agent work"
203+
```
204+
205+
Use `required` instead of `optional` when agents must stop before billable
206+
coding work until `/track-time-keito` has configured the repo:
207+
208+
```sh
209+
~/.keito/keito-cli/setup --team required
210+
```
211+
212+
If the CLI is already installed and the global skill is already configured, you
213+
can run only the repo bootstrap:
214+
215+
```sh
216+
keito skill team-init optional
217+
keito skill team-init required
218+
```
219+
220+
`team-init` writes `AGENTS.md`, `CLAUDE.md`, `.gitignore`, and
221+
`.keito/config.example.yml`. It does not vendor the skill into the repo. Do not
222+
commit `.keito/config.yml`; that file contains the local project/task mapping
223+
created by `/track-time-keito`.
224+
225+
### How It Works
226+
227+
- `./setup` is the gstack-style source-checkout installer. It keeps a stable
228+
checkout at `~/.keito/keito-cli`, installs the CLI if needed, then calls
229+
`keito skill install --source bundled`.
230+
- `keito skill install` materializes the bundled `keito-time-track` skill and
231+
copies it into agent home directories:
232+
`~/.claude/skills/keito-time-track` for Claude Code and
233+
`~/.codex/skills/keito-time-track` for Codex.
234+
- The hook installers merge lifecycle hooks into `~/.claude/settings.json` and
235+
`~/.codex/hooks.json` using `jq`.
236+
- `/track-time-keito` verifies auth, asks for the Keito client/project/task for
237+
the current repo, and writes `.keito/config.yml`.
238+
- On agent session start, the hook records local session state. On session end,
239+
the hook logs one Keito time entry with `source=agent` and metadata such as
240+
repo path, branch, commit, and agent type.
241+
242+
Audit-first external install remains available:
243+
244+
```sh
245+
npx --yes skills@1.5.6 add osodevops/keito-skill -g -a codex -a claude-code -s keito-time-track -y --copy
246+
keito skill install --skip-skills-add
247+
```
121248

122249
## Features
123250

docs/agent-guide.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,47 @@ keito auth status --json
2828

2929
Exit code `0` = ready. Exit code `1` = fix credentials.
3030

31+
## Skill Installation
32+
33+
Install the packaged Keito skill into Claude Code and Codex:
34+
35+
```sh
36+
keito skill install
37+
```
38+
39+
Install one host only when needed:
40+
41+
```sh
42+
keito skill install --agent claude-code
43+
keito skill install --agent codex
44+
```
45+
46+
For source-checkout installs, use the gstack-style setup entrypoint:
47+
48+
```sh
49+
git clone --single-branch --depth 1 https://github.com/osodevops/keito-cli.git ~/.keito/keito-cli
50+
cd ~/.keito/keito-cli
51+
./setup
52+
```
53+
54+
From each client repository, invoke the skill once:
55+
56+
```text
57+
/track-time-keito
58+
```
59+
60+
This writes `.keito/config.yml` with the selected Keito client, project, and
61+
task IDs. Do not commit that file. For shared repositories, run
62+
`keito skill team-init optional` or `keito skill team-init required` to add
63+
agent guidance plus `.keito/config.example.yml`.
64+
65+
Check readiness:
66+
67+
```sh
68+
keito skill doctor
69+
keito skill status --json
70+
```
71+
3172
## Discovery
3273

3374
### List Projects
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Keito Positioning: AI-Native Services
2+
3+
Keito should be positioned as billing and profitability infrastructure for
4+
AI-native services companies.
5+
6+
## Why Now
7+
8+
YC's Summer 2026 Request for Startups explicitly calls for **AI-Native Service
9+
Companies**: companies that do not sell software, but sell the completed
10+
service. YC also calls for **Software for Agents**, arguing that agents need
11+
machine-readable APIs, MCPs, CLIs, and documentation so they can use tools
12+
programmatically without a human in the loop.
13+
14+
Sources:
15+
- https://www.ycombinator.com/rfs
16+
- https://github.com/garrytan/gstack
17+
18+
The category implication is direct: if agents are doing client work, the
19+
software around services businesses has to become agent-native too. Billing,
20+
time tracking, project mapping, approvals, and profitability reporting cannot
21+
remain browser-only workflows for humans.
22+
23+
## Category Frame
24+
25+
Keito is not LLM cost observability.
26+
27+
LLM observability answers:
28+
- Which model ran?
29+
- How many tokens did it use?
30+
- What did the inference cost?
31+
- Was latency or quality acceptable?
32+
33+
Keito answers:
34+
- Which client and project did the agent work for?
35+
- What task was delivered?
36+
- What time or effort should flow into billing?
37+
- What did that work cost internally?
38+
- What margin did the client, project, workflow, or agent generate?
39+
40+
Lightspeed's investment note on Paid frames the same gap as missing economic
41+
infrastructure for AI agents: traditional SaaS pricing breaks when agents are
42+
autonomous digital workers, and the missing capabilities are value proof,
43+
custom pricing, outcome and hybrid models, cost tracking, and customer
44+
profitability dashboards.
45+
46+
Source:
47+
- https://lsvp.com/stories/the-ai-agent-economy-has-a-19-trillion-problem-our-investment-in-paid/
48+
49+
## Buyer
50+
51+
Primary buyer:
52+
- AI-native agencies and consultancies
53+
- Professional-services teams using coding, research, support, finance, or
54+
operations agents
55+
- YC-style startups replacing outsourced services with agent-run delivery
56+
57+
The buyer wants software-margin economics without losing service-business
58+
controls: client attribution, auditability, utilization, approval, invoices,
59+
and profitability.
60+
61+
## Messaging
62+
63+
Use this compact positioning:
64+
65+
> Keito is the billing and profitability layer for AI-native services teams.
66+
> Agents log work against clients, projects, and tasks the same way humans do,
67+
> so firms can invoice accurately, prove value, and see margin by customer and
68+
> workflow.
69+
70+
Supporting claims:
71+
- "Bring Keito to where agents work": ship a CLI plus Codex and Claude Code
72+
skills, not a dashboard-only workflow.
73+
- "Track billable work, not just token spend": connect agent activity to
74+
projects, invoices, and margin.
75+
- "One worktree, one client/project/task mapping": repo-local setup keeps
76+
agent time from leaking across clients.
77+
- "Best-effort hooks, deterministic CLI": agent sessions should never fail
78+
because billing telemetry failed, but failures must be logged and recoverable.
79+
80+
## Product Implications For The CLI
81+
82+
The CLI should prioritize:
83+
- Bundled agent skills for Codex and Claude Code.
84+
- A gstack-style install flow: install globally, then bootstrap each repo.
85+
- Deterministic `--json` commands and stable exit codes.
86+
- `source=agent` entries with metadata for session ID, agent type, skill, git
87+
branch, git revision, duration, and draft status.
88+
- Repo-local `.keito/config.yml` selected by a wizard and excluded from git.
89+
- `keito skill status` and `keito skill doctor` for agent-readable readiness.
90+
91+
MindStudio's monetization guide makes the margin reason explicit: successful
92+
AI-agent businesses need disciplined cost tracking and 60-75% gross margins;
93+
cost creep at the interaction level can erase margin. Keito should connect
94+
that cost discipline to the professional-services billing system.
95+
96+
Source:
97+
- https://www.mindstudio.ai/blog/build-monetize-ai-agents-business

0 commit comments

Comments
 (0)