howicc 2.0.0

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 ADDED
@@ -0,0 +1,133 @@
1
+ # howicc
2
+
3
+ The current HowiCC command-line app for local coding-agent workflows.
4
+
5
+ It is aligned with the revamp architecture:
6
+
7
+ - `@howicc/api-client`
8
+ - `@howicc/provider-claude-code`
9
+ - `@howicc/render`
10
+ - the typed upload and CLI-auth contracts
11
+
12
+ ## What It Does
13
+
14
+ The new CLI is designed around the real lifecycle of local sessions:
15
+
16
+ - discover Claude Code sessions on disk
17
+ - inspect the canonical and rendered outputs
18
+ - sync sessions through the typed upload pipeline
19
+ - remember local sync state so repeat runs stay fast and predictable
20
+ - authenticate through the browser flow used by the web app
21
+
22
+ ## Quick Start
23
+
24
+ ```bash
25
+ pnpm --filter howicc exec tsx src/index.ts login
26
+ pnpm --filter howicc exec tsx src/index.ts list --unsynced
27
+ pnpm --filter howicc exec tsx src/index.ts sync
28
+ pnpm --filter howicc exec tsx src/index.ts profile
29
+ ```
30
+
31
+ Published CLI usage is the same without the `pnpm ... tsx src/index.ts` prefix:
32
+
33
+ ```bash
34
+ howicc login
35
+ howicc list --unsynced
36
+ howicc sync
37
+ howicc profile
38
+ ```
39
+
40
+ ## Command Surface
41
+
42
+ ### `howicc config`
43
+
44
+ Configure the API and web origins used by the CLI.
45
+
46
+ - stores local defaults for the CLI
47
+ - validates connectivity when possible
48
+ - respects `HOWICC_API_URL` and `HOWICC_WEB_URL` runtime overrides
49
+
50
+ Related commands:
51
+
52
+ - `howicc config:show`
53
+ - `howicc config:reset --yes`
54
+
55
+ ### `howicc login`
56
+
57
+ Starts the browser-based CLI auth flow.
58
+
59
+ - opens the HowiCC web login page
60
+ - prints a manual fallback URL if browser launch fails
61
+ - stores the resulting CLI token and user identity locally
62
+
63
+ Related commands:
64
+
65
+ - `howicc whoami`
66
+ - `howicc logout`
67
+
68
+ ### `howicc list`
69
+
70
+ Browse local Claude Code sessions with sync-aware labels.
71
+
72
+ - groups sessions by local project path
73
+ - shows whether each session is new, changed since the last sync, or already synced
74
+ - summarizes turns, tools, files, languages, commits, and PR references when parsing succeeds
75
+
76
+ Useful examples:
77
+
78
+ ```bash
79
+ howicc list
80
+ howicc list --unsynced
81
+ howicc list --synced --limit 20
82
+ howicc list --all
83
+ ```
84
+
85
+ ### `howicc sync`
86
+
87
+ Sync local sessions through the typed upload architecture.
88
+
89
+ Default behavior is intentionally opinionated:
90
+
91
+ - verifies CLI auth before doing work
92
+ - prefers sessions that look new or changed since the last sync
93
+ - asks for confirmation before upload unless `--yes` is passed
94
+ - skips unchanged revisions unless `--force` is passed
95
+
96
+ Useful examples:
97
+
98
+ ```bash
99
+ howicc sync
100
+ howicc sync --select
101
+ howicc sync --recent 10
102
+ howicc sync 01HXYZABCDEF
103
+ howicc sync --all --force
104
+ ```
105
+
106
+ ### `howicc inspect` and `howicc export`
107
+
108
+ Use these when you need to inspect the canonical pipeline directly or export bundle data for debugging.
109
+
110
+ ```bash
111
+ howicc inspect 01HXYZABCDEF
112
+ howicc export 01HXYZABCDEF --format canonical
113
+ howicc export 01HXYZABCDEF --format render --output /tmp/session.json
114
+ ```
115
+
116
+ ### `howicc profile`
117
+
118
+ Aggregates local sessions into the AI coding profile view.
119
+
120
+ ## Packaging
121
+
122
+ Useful development commands:
123
+
124
+ ```bash
125
+ pnpm --filter howicc build
126
+ pnpm --filter howicc type-check
127
+ pnpm --filter howicc test
128
+ pnpm --filter howicc pack:dry-run
129
+ ```
130
+
131
+ ## Scope
132
+
133
+ `apps/cli` is the only active CLI surface in this repository.
package/bin/howicc.cjs ADDED
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require('node:child_process')
4
+ const { existsSync, readFileSync } = require('node:fs')
5
+ const { join } = require('node:path')
6
+
7
+ const distEntryPath = join(__dirname, '..', 'dist', 'index.cjs')
8
+ const sourceEntryPath = join(__dirname, '..', 'src', 'index.ts')
9
+ const packageJsonPath = join(__dirname, '..', 'package.json')
10
+ const packageVersion = JSON.parse(readFileSync(packageJsonPath, 'utf8')).version
11
+
12
+ const commandArgs = existsSync(distEntryPath)
13
+ ? [distEntryPath, ...process.argv.slice(2)]
14
+ : [require.resolve('tsx/cli'), sourceEntryPath, ...process.argv.slice(2)]
15
+
16
+ const result = spawnSync(process.execPath, commandArgs, {
17
+ env: {
18
+ ...process.env,
19
+ HOWICC_CLI_VERSION: packageVersion,
20
+ },
21
+ stdio: 'inherit',
22
+ })
23
+
24
+ process.exit(result.status ?? 1)