Skip to content

Commit 886d01e

Browse files
authored
feat(cli): rename CLI binary to hypergraph (+ hg alias) and update docs (#241)
**Renamed “studio” → “typesync” in our CLI** • Renamed the `studio` sub-command to `typesync` • Installation package renamed to `@graphprotocol/typesync-cli` • Binaries now invoked as: ```bash hypergraph typesync hg typesync ``` • All examples in `apps/typesync/README.md` updated to reflect the new command name and flags (`--port`, `--open`, `--browser`) • No other functionality or flags were changed—only the command name and docs This brings the CLI name in line with its core “typesync” functionality and removes any leftover “studio” terminology.
1 parent d4a414b commit 886d01e

File tree

5 files changed

+31
-25
lines changed

5 files changed

+31
-25
lines changed

apps/typesync/README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,40 @@
1-
# @graphprotocol/typesync
1+
# @graphprotocol/hypergraph-cli
22

3-
CLI toolchain to view existing types, select, pick, extend to create schemas and generate a [@graphprotocol/hypergraph](https://github.com/graphprotocol/hypergraph/tree/main/packages/hypergraph) schema.
3+
# Hypergraph command-line toolchain for scaffolding and working with Hypergraph applications.
44

55
## Installing
66

77
```bash
88
# npm
9-
npm i -g @graphprotocol/typesync-cli
9+
npm i -g @graphprotocol/hypergraph-cli
1010

1111
# yarn
12-
yarn global add @graphprotocol/typesync-cli
12+
yarn global add @graphprotocol/hypergraph-cli
1313

1414
# pnpm
15-
pnpm install -g @graphprotocol/typesync-cli
15+
pnpm install -g @graphprotocol/hypergraph-cli
1616
```
1717

1818
## Running
1919

2020
```bash
21-
typsync --help
21+
hypergraph --help
22+
hg --help # short alias
2223

23-
# opening typesync studio
24-
typesync studio
24+
# opening TypeSync
25+
hypergraph typesync
26+
hg typesync
2527

26-
# opening typesync studio in firefox automatically
27-
typesync studio --open --browser firefox
28+
# opening TypeSync in firefox automatically
29+
hypergraph typesync --open --browser firefox
2830
```
2931

3032
## Commands
3133

32-
- `studio` -> runs the `Typesync` api and client UI application for viewing created application schemas, browsing the Knowledge Graph, and creating new application schemas.
33-
- running: `typesync studio`
34+
- `typesync` -> runs the Hypergraph API and client UI application for viewing created application schemas, browsing the Knowledge Graph, and creating new application schemas.
35+
- running: `hypergraph typesync`
3436
- args:
3537
- `port` [OPTIONAL, default = 3000] port to run the application on
36-
- example: `typesync studio --port 3001`
38+
- example: `hypergraph typesync --port 3001`
3739
- `browser` [OPTION, default 'browser'] browser to open the app in, if the `--open` flag is passed
38-
- example: `typesync studio --open --browser firefox`
40+
- example: `hypergraph typesync --open --browser firefox`

apps/typesync/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"linkDirectory": false
1616
},
1717
"bin": {
18-
"typesync": "./dist/bin.cjs"
18+
"hypergraph": "./dist/bin.cjs",
19+
"hg": "./dist/bin.cjs"
1920
},
2021
"files": ["README.md", "dist"],
2122
"scripts": {
@@ -24,7 +25,7 @@
2425
"build": "rm -rf dist && pnpm run build:client && tsup && pnpm run copy-all",
2526
"build:ts": "tsup",
2627
"dev": "vite build && pnpx tsx ./src/bin.ts",
27-
"dev:cli": "pnpx tsx ./src/bin.ts studio",
28+
"dev:cli": "pnpx tsx ./src/bin.ts typesync",
2829
"dev:client": "vite --force",
2930
"clean": "rimraf dist/*",
3031
"start": "node ./dist/bin.cjs",
@@ -35,7 +36,7 @@
3536
"copy-db-migrations": "cp -rp ./src/migrations ./dist/migrations",
3637
"copy-client-dist": "mkdir -p ./dist/client && cp -rp ./client/dist ./dist/client/dist",
3738
"copy-all": "pnpm run copy-package-json && pnpm run copy-db-migrations && pnpm run copy-client-dist",
38-
"typesync": "pnpx tsx ./src/bin.ts studio"
39+
"hypergraph": "pnpx tsx ./src/bin.ts typesync"
3940
},
4041
"devDependencies": {
4142
"@effect/cli": "latest",

apps/typesync/scripts/copy-package-json.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ const program = Effect.gen(function* () {
1313
type: json.type,
1414
description: json.description,
1515
main: 'bin.cjs',
16-
bin: 'bin.cjs',
16+
bin: {
17+
hypergraph: 'bin.cjs',
18+
hg: 'bin.cjs',
19+
},
1720
engines: json.engines,
1821
dependencies: json.dependencies,
1922
peerDependencies: json.peerDependencies,

apps/typesync/src/Cli.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import * as Command from '@effect/cli/Command';
22

3-
import { studio } from './subcommands/studio.js';
3+
import { typesync } from './subcommands/studio.js';
44

5-
const typesync = Command.make('typesync').pipe(
5+
const hypergraph = Command.make('hypergraph').pipe(
66
Command.withDescription(
7-
'Typesync command line interface for building and interacting with @graphprotocol/hypergraph schemas',
7+
'Hypergraph command line interface for building and interacting with @graphprotocol/hypergraph schemas',
88
),
9-
Command.withSubcommands([studio]),
9+
Command.withSubcommands([typesync]),
1010
);
1111

12-
export const run = Command.run(typesync, {
13-
name: 'typesync',
12+
export const run = Command.run(hypergraph, {
13+
name: 'hypergraph',
1414
version: '0.0.0-alpha',
1515
});

apps/typesync/src/subcommands/studio.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import open, { type AppName } from 'open';
1111

1212
import * as Server from '../Server.js';
1313

14-
export const studio = Command.make('studio', {
14+
export const typesync = Command.make('typesync', {
1515
args: {
1616
port: Options.integer('port').pipe(
1717
Options.withAlias('p'),

0 commit comments

Comments
 (0)