anhedral 0.20.0 → 0.21.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 +7 -7
- package/dist/capability-catalog.d.ts +1 -1
- package/dist/capability-catalog.js +1 -1
- package/dist/cli-arguments.js +2 -0
- package/dist/cli-commands.js +1 -4
- package/dist/cli-errors.js +3 -5
- package/dist/command-schema.js +0 -37
- package/dist/completion.js +0 -3
- package/dist/launch.js +4 -2
- package/dist/platforms/tanstack.js +0 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/capabilities.md +1 -1
- package/docs/software-factory.md +1 -1
- package/docs/stack-standard.md +1 -1
- package/docs/ui.md +10 -13
- package/package.json +1 -4
- package/assets/ui/LICENSE.react-native-reusables +0 -21
- package/assets/ui/catalog.json +0 -603
- package/assets/ui/extensions/registry.json +0 -6
- package/dist/ui-catalog.d.ts +0 -24
- package/dist/ui-catalog.js +0 -15
- package/dist/ui-command.d.ts +0 -5
- package/dist/ui-command.js +0 -221
- package/dist/ui-project.d.ts +0 -24
- package/dist/ui-project.js +0 -112
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ cd my-app
|
|
|
13
13
|
pnpm dev
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Init creates `apps/web` and shared tooling with OJ and TanStack Start server rendering/server functions and
|
|
16
|
+
Init creates `apps/web` and shared tooling with OJ and TanStack Start server rendering/server functions and editable shadcn starter components. It does not add an API, database, authentication, storage or payments. Preview with `anhedral init my-app --dry-run --json`; use `--skip-install --no-git` for offline source generation.
|
|
17
17
|
|
|
18
18
|
## Add services
|
|
19
19
|
|
|
@@ -34,16 +34,16 @@ Use `anhedral stack list`, `status` and `doctor` to inspect the Anhedral Stack a
|
|
|
34
34
|
|
|
35
35
|
Update your agent plugin through its host and select the matching published CLI version. Preview `anhedral stack update --dry-run --json`, review the returned diffs/conflicts, then apply `anhedral stack update --expect-plan <planId> --json`. Updates preserve authored source and stop on customized-file conflicts or a changed plan. They refresh generated runtime/configuration and deployment provenance without running project scripts or installing dependencies. Validate dependencies and the application separately before upload/deployment. See [the operating workflow](docs/software-factory.md).
|
|
36
36
|
|
|
37
|
-
##
|
|
37
|
+
## Web UI
|
|
38
|
+
|
|
39
|
+
Init includes shadcn Button, Input and Label source with standard `components.json` configuration. Use upstream shadcn directly for more components, or replace the UI with any library. There is no Anhedral UI catalog or CLI wrapper.
|
|
38
40
|
|
|
39
41
|
```sh
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
anhedral ui diff card --web
|
|
43
|
-
anhedral ui doctor --web
|
|
42
|
+
cd apps/web
|
|
43
|
+
pnpm dlx shadcn@4.22.1 add card
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Review diffs and preserve local edits and required upstream notices. The generated `LICENSE.shadcn` accompanies the bundled starter source. See [web UI](docs/ui.md).
|
|
47
47
|
|
|
48
48
|
## Optional Platform access
|
|
49
49
|
|
|
@@ -34,7 +34,7 @@ export declare const ANHEDRAL_STACK: {
|
|
|
34
34
|
readonly name: "Anhedral Stack";
|
|
35
35
|
readonly foundation: {
|
|
36
36
|
readonly id: "tanstack-start";
|
|
37
|
-
readonly name: "TanStack Start +
|
|
37
|
+
readonly name: "TanStack Start + shadcn";
|
|
38
38
|
readonly targets: readonly ["apps/web/package.json", "apps/web/src/router.tsx", "apps/web/src/server.ts", "apps/web/src/routes/__root.tsx", "apps/web/src/routes/index.tsx"];
|
|
39
39
|
};
|
|
40
40
|
readonly additions: {
|
package/dist/cli-arguments.js
CHANGED
|
@@ -75,6 +75,8 @@ export function globalArguments(input) {
|
|
|
75
75
|
function definitionFor(command) {
|
|
76
76
|
const definition = commandDefinition(command);
|
|
77
77
|
if (!definition) {
|
|
78
|
+
if (command === 'ui')
|
|
79
|
+
throw new CliArgumentError('The Anhedral UI command has been retired. Use shadcn directly or your preferred UI library.', 'Run pnpm dlx shadcn@4.22.1 add <component> from apps/web, or see https://ui.shadcn.com/docs/installation/tanstack.', 'UNKNOWN_COMMAND');
|
|
78
80
|
const recommendation = suggest(command, [...Object.keys(COMMANDS), 'help']);
|
|
79
81
|
const name = /^[a-z-]{1,32}$/.test(command) ? `: ${command}` : '';
|
|
80
82
|
throw new CliArgumentError(`Unknown command${name}.${recommendation ? ` Did you mean ${recommendation}?` : ''}`, 'Run anhedral --help.', 'UNKNOWN_COMMAND');
|
package/dist/cli-commands.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { runPlatformCommand } from './platform-command.js';
|
|
2
2
|
import { runStackUpdate } from './stack-update.js';
|
|
3
3
|
import { runCapabilityCommand } from './capability-command.js';
|
|
4
|
-
import { runAnhedralUiCommand } from './ui-command.js';
|
|
5
4
|
import { commandArgumentError } from './cli-arguments.js';
|
|
6
5
|
import { createReporter } from './cli-output.js';
|
|
7
6
|
import { scaffoldLaunchProject, parseAnhedralStackOptions } from './launch.js';
|
|
@@ -34,10 +33,8 @@ export async function runCommand(command, args, output) {
|
|
|
34
33
|
return runStackUpdate(args, output);
|
|
35
34
|
if (command === 'add' || command === 'stack')
|
|
36
35
|
return runCapabilityCommand(command, args, output);
|
|
37
|
-
if (command === 'ui')
|
|
38
|
-
return runAnhedralUiCommand(args, output);
|
|
39
36
|
if (command !== 'init')
|
|
40
|
-
throw commandArgumentError(command, 'Use init, add
|
|
37
|
+
throw commandArgumentError(command, 'Use init, add or stack. Run anhedral --help.');
|
|
41
38
|
let options;
|
|
42
39
|
try {
|
|
43
40
|
options = parseAnhedralStackOptions(args);
|
package/dist/cli-errors.js
CHANGED
|
@@ -48,11 +48,9 @@ export function describeFailure(error, command) {
|
|
|
48
48
|
? 'GENERATION_FAILED'
|
|
49
49
|
: command === 'add' || command === 'stack'
|
|
50
50
|
? 'CAPABILITY_COMMAND_FAILED'
|
|
51
|
-
: command
|
|
52
|
-
? '
|
|
53
|
-
:
|
|
54
|
-
? 'PLATFORM_COMMAND_FAILED'
|
|
55
|
-
: 'INTERNAL_ERROR';
|
|
51
|
+
: ['login', 'logout', 'whoami', 'link', 'unlink', 'source', 'deploy'].includes(command ?? '')
|
|
52
|
+
? 'PLATFORM_COMMAND_FAILED'
|
|
53
|
+
: 'INTERNAL_ERROR';
|
|
56
54
|
return {
|
|
57
55
|
error: error instanceof Error ? error.message : String(error),
|
|
58
56
|
code,
|
package/dist/command-schema.js
CHANGED
|
@@ -521,43 +521,6 @@ export const COMMANDS = {
|
|
|
521
521
|
examples: ['stack list', 'stack status --json', 'stack doctor'],
|
|
522
522
|
note: 'Installed source is not proof of live provider activation.',
|
|
523
523
|
},
|
|
524
|
-
ui: {
|
|
525
|
-
description: 'Source-owned web UI for the Anhedral Stack.',
|
|
526
|
-
usage: 'ui <init|add|list|diff|doctor> [components...] [options]',
|
|
527
|
-
options: [
|
|
528
|
-
{ flag: '--web', description: 'Select the Anhedral Stack web application.' },
|
|
529
|
-
{ flag: '--dry-run', description: 'Show the installer plan without writes or network.' },
|
|
530
|
-
],
|
|
531
|
-
children: Object.fromEntries(['init', 'add', 'list', 'diff', 'doctor'].map((action) => [
|
|
532
|
-
action,
|
|
533
|
-
{
|
|
534
|
-
description: {
|
|
535
|
-
init: 'Initialize Anhedral UI configuration.',
|
|
536
|
-
add: 'Install selected UI components.',
|
|
537
|
-
list: 'List available Anhedral Stack web components.',
|
|
538
|
-
diff: 'Inspect differences for selected UI components.',
|
|
539
|
-
doctor: 'Check UI configuration.',
|
|
540
|
-
}[action],
|
|
541
|
-
usage: `ui ${action}${['add', 'diff'].includes(action) ? ' <components...>' : ''} [options]`,
|
|
542
|
-
options: [
|
|
543
|
-
{ flag: '--web', description: 'Select the Anhedral Stack web application.' },
|
|
544
|
-
{ flag: '--dry-run', description: 'Preview without writes or network.' },
|
|
545
|
-
],
|
|
546
|
-
positional: {
|
|
547
|
-
name: 'components',
|
|
548
|
-
min: ['add', 'diff'].includes(action) ? 1 : 0,
|
|
549
|
-
max: ['add', 'diff'].includes(action) ? 50 : 0,
|
|
550
|
-
kind: 'component',
|
|
551
|
-
},
|
|
552
|
-
examples: [
|
|
553
|
-
`ui ${action}${['add', 'diff'].includes(action) ? ' button --web' : ''}`,
|
|
554
|
-
`ui ${action}${['add', 'diff'].includes(action) ? ' button --web' : ''} --json`,
|
|
555
|
-
],
|
|
556
|
-
},
|
|
557
|
-
])),
|
|
558
|
-
examples: ['ui list', 'ui add button --web', 'ui diff button', 'ui doctor'],
|
|
559
|
-
note: 'Web component installation uses the pinned official shadcn CLI. No automatic overwrite or provider operations.',
|
|
560
|
-
},
|
|
561
524
|
init: {
|
|
562
525
|
description: 'Create the Anhedral Stack: web UI first, then add backend, storage and payments.',
|
|
563
526
|
usage: 'init [directory] [options]',
|
package/dist/completion.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { COMMANDS, GLOBAL_OPTIONS, commandOptions, commandTopic, } from './command-schema.js';
|
|
2
2
|
import { PUBLIC_STACK_ADDITIONS } from './capability-catalog.js';
|
|
3
|
-
import { UI_CATALOG } from './ui-catalog.js';
|
|
4
3
|
/** Quote data for shell source. Completion never evaluates user input. */
|
|
5
4
|
function quote(value) {
|
|
6
5
|
return "'" + value.replaceAll("'", "'\"'\"'") + "'";
|
|
@@ -25,8 +24,6 @@ function choices(definition) {
|
|
|
25
24
|
const positional = definition.positional;
|
|
26
25
|
if (positional?.kind === 'capability')
|
|
27
26
|
return PUBLIC_STACK_ADDITIONS;
|
|
28
|
-
if (positional?.kind === 'component')
|
|
29
|
-
return UI_CATALOG.components.filter((entry) => entry.web).map((entry) => entry.name);
|
|
30
27
|
return positional?.choices ?? [];
|
|
31
28
|
}
|
|
32
29
|
function optionCase(context, option) {
|
package/dist/launch.js
CHANGED
|
@@ -102,7 +102,7 @@ function documentation(root, name) {
|
|
|
102
102
|
put(root, 'README.md', `# ${name}
|
|
103
103
|
|
|
104
104
|
Anhedral Stack: web UI powered by OJ and TanStack Start server rendering/server functions
|
|
105
|
-
and
|
|
105
|
+
and editable shadcn components.
|
|
106
106
|
Only the web application is created initially. No backend or provider is provisioned.
|
|
107
107
|
|
|
108
108
|
## Develop
|
|
@@ -110,7 +110,9 @@ Only the web application is created initially. No backend or provider is provisi
|
|
|
110
110
|
Use the Node/pnpm versions in package.json. Run pnpm install if generation skipped
|
|
111
111
|
installation, then pnpm dev and open http://localhost:3000. Run pnpm check and
|
|
112
112
|
pnpm audit:deps before deployment. Editable routes live in apps/web/src/routes.
|
|
113
|
-
Use
|
|
113
|
+
Use cd apps/web && pnpm dlx shadcn@4.22.1 add card for more shadcn components.
|
|
114
|
+
Shadcn is the default, not a restriction: use any UI library and preserve local edits.
|
|
115
|
+
Keep LICENSE.shadcn with the copied starter components.
|
|
114
116
|
|
|
115
117
|
## Add services progressively
|
|
116
118
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
2
|
import { ANHEDRAL_STACK_DEPENDENCIES, WEB_DEPENDENCIES } from '../dependencies.js';
|
|
4
3
|
import { CapabilityEditor, fingerprint } from '../capability-editor.js';
|
|
5
4
|
import { resourceName } from '../render.js';
|
|
6
5
|
import { json, put, workerConfig } from '../scaffold/files.js';
|
|
7
|
-
import { initializeUiMetadata } from '../ui-project.js';
|
|
8
6
|
const template = (name) => readFileSync(new URL(`../../assets/launch/${name}`, import.meta.url), 'utf8');
|
|
9
7
|
/** The launch foundation is a web service; Hono owns application services and data. */
|
|
10
8
|
export function scaffoldTanstack(root, name) {
|
|
@@ -98,7 +96,6 @@ export default [...config, { ignores: ['dist/**', '.wrangler/**', 'src/routeTree
|
|
|
98
96
|
},
|
|
99
97
|
iconLibrary: 'lucide',
|
|
100
98
|
});
|
|
101
|
-
initializeUiMetadata(path.join(root, app), 'web');
|
|
102
99
|
put(root, `${app}/src/lib/utils.ts`, `import { clsx, type ClassValue } from 'clsx';
|
|
103
100
|
import { twMerge } from 'tailwind-merge';
|
|
104
101
|
export function cn(...values: ClassValue[]) { return twMerge(clsx(values)); }
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const GENERATOR_VERSION = "0.
|
|
1
|
+
export declare const GENERATOR_VERSION = "0.21.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const GENERATOR_VERSION = '0.
|
|
1
|
+
export const GENERATOR_VERSION = '0.21.0';
|
package/docs/capabilities.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Anhedral Stack additions
|
|
2
2
|
|
|
3
|
-
There is one current **Anhedral Stack**. `anhedral init` creates its web foundation with TanStack Start SSR/server functions and
|
|
3
|
+
There is one current **Anhedral Stack**. `anhedral init` creates its web foundation with TanStack Start SSR/server functions and editable shadcn components. Add the remaining services only when needed.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
anhedral init my-app
|
package/docs/software-factory.md
CHANGED
|
@@ -9,7 +9,7 @@ The Anhedral Stack has one current web foundation and progressive backend/storag
|
|
|
9
9
|
3. Preview and add [capabilities](capabilities.md) as needed. Configure selected
|
|
10
10
|
providers/auth methods, apply reviewed migrations and validate actual runtime
|
|
11
11
|
behavior before deployment. Source installation is not provider activation.
|
|
12
|
-
4.
|
|
12
|
+
4. Choose or extend [web UI](ui.md), implement features and run consumer checks.
|
|
13
13
|
|
|
14
14
|
## Evidence-driven maintenance
|
|
15
15
|
|
package/docs/stack-standard.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Anhedral Stack** is the single current stack. The CLI generates its editable source; Platform independently owns managed builds, resource admission, deployment and operations. There is no public multi-stack registry or framework selector.
|
|
4
4
|
|
|
5
|
-
The web foundation uses TanStack Start SSR/server functions and
|
|
5
|
+
The web foundation uses TanStack Start SSR/server functions and editable shadcn components. `anhedral init` creates only that foundation. `add backend` composes Hono, Drizzle/D1 and Better Auth together. Add private R2 or Stripe subscriptions later when needed. See [additions](capabilities.md).
|
|
6
6
|
|
|
7
7
|
When selected, Hono owns privileged business/auth/data/storage operations. Web server functions call its scoped service binding; application source is never imported across application boundaries. Keep resources private, enforce identity/ownership/limits and configure secrets per environment.
|
|
8
8
|
|
package/docs/ui.md
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Web UI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`anhedral init` defaults to standard shadcn components. It creates web `components.json`, the `cn` utility, semantic theme tokens, and editable Button, Input and Label source. These defaults are optional: consumers may extend, replace or remove them and use any UI library. There is no separate Anhedral UI library, catalog, ownership marker or `anhedral ui` command.
|
|
4
|
+
|
|
5
|
+
Use upstream shadcn directly from the web application:
|
|
4
6
|
|
|
5
7
|
```sh
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
anhedral ui doctor --web
|
|
8
|
+
cd apps/web
|
|
9
|
+
pnpm dlx shadcn@4.22.1 add card
|
|
10
|
+
pnpm dlx shadcn@4.22.1 diff card
|
|
10
11
|
```
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
`--dry-run --json` previews configuration/installation without network or writes. Selected destinations, metadata and attribution paths are preflighted before installation. CLI-owned writes refuse symlinked metadata destinations. Bounded consumer manifest/configuration links remain supported where their targets are regular files. Ambiguous or invalid targets stop before installation.
|
|
15
|
-
|
|
16
|
-
The pinned official shadcn CLI resolves registry dependencies and copies source. `add` never requests overwrite; review diffs and reconcile customizations explicitly. `diff` delegates to the upstream preview. Installer failure can leave partial upstream changes, so inspect Git before retrying.
|
|
13
|
+
Inspect the consuming project's instructions and existing source first. Review upstream changes and reconcile customized files; do not request automatic overwrite. Upstream installation can change dependencies and source, so inspect Git and run consumer checks afterward. Validate browser behavior, keyboard focus and interactions as well as types.
|
|
17
14
|
|
|
18
|
-
`
|
|
15
|
+
The shipped starter components remain MIT-licensed shadcn source. Init preserves their notice in `apps/web/LICENSE.shadcn` and provenance in `apps/web/UPSTREAM.json`; customization and rebranding do not remove those notices. This is upstream attribution, not an Anhedral UI license. Preserve applicable licenses for any replacement dependencies too. Existing projects may retain `.anhedral-ui.json` or `ANHEDRAL_UI_LICENSES/`; do not delete authored source or required notices during migration. New initialization does not create those legacy paths.
|
|
19
16
|
|
|
20
|
-
|
|
17
|
+
UI selection does not activate backend services or hosting. See [stack additions](capabilities.md). The MVP is web-only. If Expo returns after MVP, React Native Reusables is the intended native default; it is not a current CLI capability.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anhedral",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "Generate the Anhedral Stack as editable source: start with web UI, then add backend, storage and payments.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -34,10 +34,7 @@
|
|
|
34
34
|
"assets/stack",
|
|
35
35
|
"docs/capabilities.md",
|
|
36
36
|
"assets/ui/web",
|
|
37
|
-
"assets/ui/catalog.json",
|
|
38
|
-
"assets/ui/extensions",
|
|
39
37
|
"assets/ui/LICENSE.shadcn",
|
|
40
|
-
"assets/ui/LICENSE.react-native-reusables",
|
|
41
38
|
"assets/ui/UPSTREAM.json",
|
|
42
39
|
"assets/contracts",
|
|
43
40
|
"assets/security",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Founded Labs
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|