@telepat/ideon 0.1.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 +149 -0
- package/dist/deleteConfirmationFlow-JVQD3YU4.js +51 -0
- package/dist/ideon.d.ts +1 -0
- package/dist/ideon.js +8420 -0
- package/dist/preview/app-assets/favicon-ZM13UXfJ.svg +15 -0
- package/dist/preview/app-assets/index-FIB5ZtVD.js +219 -0
- package/dist/preview/app-assets/index-NfIf2cKW.css +1 -0
- package/dist/preview/index.html +14 -0
- package/package.json +98 -0
package/README.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
```text
|
|
2
|
+
ooooo oooooooooo. oooooooooooo .oooooo. ooooo ooo
|
|
3
|
+
`888' `888' `Y8b `888' `8 d8P' `Y8b `888b. `8'
|
|
4
|
+
888 888 888 888 888 888 8 `88b. 8
|
|
5
|
+
888 888 888 888oooo8 888 888 8 `88b. 8
|
|
6
|
+
888 888 888 888 " 888 888 8 `88b.8
|
|
7
|
+
888 888 d88' 888 o `88b d88' 8 `888
|
|
8
|
+
o888o o888bood8P' o888ooooood8 `Y8bood8P' o8o `8
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
# Ideon
|
|
12
|
+
|
|
13
|
+
Ideon is a TypeScript CLI that turns an idea into one or more Markdown outputs, with optional generated images for article runs.
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- End-to-end pipeline with stage visibility: planning, sections, image prompts, image rendering, and output assembly
|
|
18
|
+
- Interactive terminal UI with clear per-stage status and summaries
|
|
19
|
+
- Non-interactive fallback logging for CI and piped runs
|
|
20
|
+
- Resume support through local stage checkpoints in `.ideon/write/state.json`
|
|
21
|
+
- Config precedence across saved settings, job files, environment variables, and CLI flags
|
|
22
|
+
- Secure secret storage in OS keychain (OpenRouter + Replicate tokens)
|
|
23
|
+
- Runtime validation for generated plan and image prompt payloads
|
|
24
|
+
- Retry + timeout hardening on OpenRouter requests
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
Prerequisites:
|
|
29
|
+
|
|
30
|
+
- Node.js 20+
|
|
31
|
+
- npm 10+
|
|
32
|
+
|
|
33
|
+
Install dependencies:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Run the CLI in development mode:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm run dev -- --help
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Getting Started
|
|
46
|
+
|
|
47
|
+
1. Configure credentials interactively:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm run dev -- settings
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
2. Generate your first article:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm run dev -- write "How small editorial teams can productionize AI writing"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
3. Generate multi-output runs:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm run dev -- write "How small editorial teams can productionize AI writing" --target article=1 --target x-post=2 --style professional
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
4. Run a safe pipeline dry run (no provider calls):
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm run dev -- write --dry-run "How AI changes technical publishing"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Core Commands
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
ideon settings
|
|
75
|
+
ideon write "An article idea"
|
|
76
|
+
ideon write --job ./job.json
|
|
77
|
+
ideon write --dry-run "An article idea"
|
|
78
|
+
ideon write resume
|
|
79
|
+
ideon delete my-article-slug
|
|
80
|
+
ideon preview
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Preview Generated Articles
|
|
84
|
+
|
|
85
|
+
Serve the latest generated article locally with assets and open it in your browser:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npm run preview
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
This launches the new React preview app (served from `dist/preview`) and the preview API server.
|
|
92
|
+
|
|
93
|
+
You can also preview a specific article and choose a port:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npm run dev -- preview ./output/my-article.md --port 4173
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
If you are iterating on preview UI code in `src/preview-app`, rebuild client assets after UI changes:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npm run build:preview
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Credentials
|
|
106
|
+
|
|
107
|
+
Live runs require:
|
|
108
|
+
|
|
109
|
+
- `IDEON_OPENROUTER_API_KEY`
|
|
110
|
+
- `IDEON_REPLICATE_API_TOKEN`
|
|
111
|
+
|
|
112
|
+
You can set these as environment variables, or save them via `ideon settings` (recommended).
|
|
113
|
+
|
|
114
|
+
## Output
|
|
115
|
+
|
|
116
|
+
By default, Ideon writes:
|
|
117
|
+
|
|
118
|
+
- Generation directories: `/output/<timestamp>-<slug>/`
|
|
119
|
+
- Markdown outputs per target: `article-1.md`, `x-1.md`, `linkedin-1.md`, and others
|
|
120
|
+
- Run artifacts per generation: `job.json`, `generation.analytics.json`
|
|
121
|
+
- Local resume artifacts: `.ideon/write/state.json`
|
|
122
|
+
|
|
123
|
+
## Development Scripts
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
npm run lint
|
|
127
|
+
npm test
|
|
128
|
+
npm run build
|
|
129
|
+
npm run preview
|
|
130
|
+
npm run pricing:refresh
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Documentation
|
|
134
|
+
|
|
135
|
+
- User and technical docs site source: `docs-site/`
|
|
136
|
+
- Start docs locally: `npm run docs:start`
|
|
137
|
+
- Build docs: `npm run docs:build`
|
|
138
|
+
|
|
139
|
+
Key docs:
|
|
140
|
+
|
|
141
|
+
- CLI commands: `docs-site/docs/reference/cli-reference.md`
|
|
142
|
+
- Configuration and precedence: `docs-site/docs/guides/configuration.md`
|
|
143
|
+
- Pipeline and resume: `docs-site/docs/guides/pipeline-stages.md`
|
|
144
|
+
- Output artifacts: `docs-site/docs/guides/output-structure.md`
|
|
145
|
+
- Performance tuning: `docs-site/docs/guides/performance-and-costs.md`
|
|
146
|
+
|
|
147
|
+
GitHub Pages URL:
|
|
148
|
+
|
|
149
|
+
- `https://telepat-io.github.io/ideon/`
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// src/cli/flows/deleteConfirmationFlow.tsx
|
|
2
|
+
import { Box, Text, useApp, useInput } from "ink";
|
|
3
|
+
import SelectInput from "ink-select-input";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
function DeleteConfirmationFlow({ targets, onDone }) {
|
|
6
|
+
const { exit } = useApp();
|
|
7
|
+
useInput((input, key) => {
|
|
8
|
+
if (key.escape || key.ctrl && input === "c") {
|
|
9
|
+
onDone(false);
|
|
10
|
+
exit();
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
14
|
+
/* @__PURE__ */ jsxs(Text, { bold: true, color: "redBright", children: [
|
|
15
|
+
'Delete article "',
|
|
16
|
+
targets.slug,
|
|
17
|
+
'"?'
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ jsx(Text, { color: "gray", children: "Use the arrow keys to choose an action, then press Enter." }),
|
|
20
|
+
/* @__PURE__ */ jsxs(Box, { marginTop: 1, flexDirection: "column", children: [
|
|
21
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
22
|
+
"- ",
|
|
23
|
+
targets.markdownPath
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
26
|
+
"- ",
|
|
27
|
+
targets.analyticsPath
|
|
28
|
+
] }),
|
|
29
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
30
|
+
"- ",
|
|
31
|
+
targets.assetDir
|
|
32
|
+
] })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ jsx(
|
|
35
|
+
SelectInput,
|
|
36
|
+
{
|
|
37
|
+
items: [
|
|
38
|
+
{ label: "Delete article and assets", value: true },
|
|
39
|
+
{ label: "Cancel", value: false }
|
|
40
|
+
],
|
|
41
|
+
onSelect: (item) => {
|
|
42
|
+
onDone(item.value);
|
|
43
|
+
exit();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
) })
|
|
47
|
+
] });
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
DeleteConfirmationFlow
|
|
51
|
+
};
|
package/dist/ideon.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|