Skip to content

Commit 0ec9df9

Browse files
authored
chore: doc content and style updates, removed public access prevention on cli and core packages (#127)
2 parents 7395303 + 92534fb commit 0ec9df9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+765
-755
lines changed

.changeset/curvy-doors-jam.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@calycode/cli': patch
3+
'@calycode/core': patch
4+
---
5+
6+
chore: added remote cache with turborepo to the workflows
7+
chore: setting up unit-testing structure
8+
chore: unified docs styling to match the rest of the websites... (still needs some work on accessibility)
9+
chore: updated docs, added discord link, cleaned up wrong naming conventions
10+
fix: fixing an issue where the json repo generation resulted in duplicate 'api group folders'
11+
refactor: cleaned up a remainder console.log, changed imports to use the barrel exports from the cli/utils

.github/workflows/add-docs-to-release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111
generate-docs:
1212
if: github.repository == 'calycode/xano-tools' && github.repository_owner == 'calycode' && startsWith(github.head_ref, 'changeset-release')
1313
runs-on: ubuntu-latest
14+
env:
15+
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
16+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
1417
steps:
1518
- uses: actions/checkout@v4
1619
with:
@@ -25,7 +28,7 @@ jobs:
2528
- uses: actions/setup-node@v4
2629
with:
2730
node-version: 20.x
28-
cache: 'pnpm'
31+
cache: "pnpm"
2932

3033
- name: Install packages
3134
run: pnpm install --frozen-lockfile

.github/workflows/release.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ jobs:
1212

1313
name: Release CLI
1414
runs-on: ubuntu-latest
15+
env:
16+
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
17+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
1518
steps:
1619
- name: Checkout repo
1720
uses: actions/checkout@v4
@@ -25,9 +28,9 @@ jobs:
2528
uses: actions/setup-node@v4
2629
with:
2730
node-version: 20.x
28-
cache: 'pnpm'
29-
registry-url: 'https://registry.npmjs.org'
30-
scope: '@calycode'
31+
cache: "pnpm"
32+
registry-url: "https://registry.npmjs.org"
33+
scope: "@calycode"
3134
always-auth: true
3235
env:
3336
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -42,8 +45,8 @@ jobs:
4245
id: changesets
4346
uses: changesets/action@v1
4447
with:
45-
commit: 'changeset-release'
46-
title: 'Release Version'
48+
commit: "changeset-release"
49+
title: "Release Version"
4750
publish: pnpm -r publish
4851
env:
4952
GITHUB_TOKEN: ${{ secrets.CHANGESETS_GH_TOKEN }}
@@ -58,6 +61,6 @@ jobs:
5861
# Upload docs to GCP ONLY after publishing
5962
- name: Upload docs
6063
if: steps.changesets.outputs.published == 'true'
61-
uses: './.github/actions/upload-docs'
64+
uses: "./.github/actions/upload-docs"
6265
with:
63-
gcp_credentials: '${{ secrets.GCP_CREDENTIALS }}'
66+
gcp_credentials: "${{ secrets.GCP_CREDENTIALS }}"

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,9 @@ calyInstance.config.js
3232
calyInstance.test.setup.json
3333

3434
**/.turbo/
35+
36+
# Turborepo
37+
.turbo
38+
39+
# Jest
40+
coverage/

README.md

Lines changed: 20 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
+==================================================================================================+
1414
```
1515

16-
[📚 **View Full CLI Documentation**](https://calycode.com/cli/docs)
16+
[📚 **View CLI Documentation**](https://calycode.com/cli/docs)
1717

1818
# xano tools
1919

@@ -25,7 +25,7 @@
2525

2626
---
2727

28-
## 🚀 Quick Start
28+
## 🚀 [Dev] Quick Start
2929

3030
```
3131
# 1. Clone the repo
@@ -34,62 +34,27 @@
3434
pnpm install
3535
3636
# 3. Build the CLI
37-
pnpm build:packages
37+
pnpm build
3838
3939
# 4. Run any command
4040
xano
4141
```
4242

4343
> _(Optional)_ If you want the CLI globally available during development:
44-
> ```
45-
> pnpm link
46-
> ```
47-
> **Note:** If you use `pnpm link`, remember to `pnpm unlink --global` when done to avoid version confusion.
48-
49-
! See the [documentation](/docs/README.md) for available commands and arguments.
50-
51-
## 🤖 Using in GitHub Actions
52-
53-
You can use this CLI as a GitHub Action to automate your Xano workflows.
54-
55-
Here is an example job that checks out your repository and uses the local composite action (`./dist/actions/master-action.yml`), which in turn securely downloads and runs the Caly-Xano CLI as npm package via the npx command.
56-
57-
```yaml
58-
jobs:
59-
sync:
60-
runs-on: ubuntu-latest
61-
62-
steps:
63-
- uses: actions/checkout@v4
64-
65-
# 1. Setup Node.js and authenticate to the npm registry
66-
- uses: actions/setup-node@v4
67-
with:
68-
node-version: '20'
69-
registry-url: 'https://registry.npmjs.org'
70-
71-
# 2. Use the Xano CLI Action from your repository
72-
# This composite action handles setup and (multiple or single) command execution by calling the published npm package.
73-
- name: Run Caly-Xano Commands
74-
uses: ./dist/actions/master-action.yml
75-
with:
76-
# Xano Instance name, used to identify the created configuration during command execution
77-
instance-name: 'production'
78-
instance-url: ${{ secrets.XANO_URL }}
79-
# Xano Metadata API token. Make sure to set it up as a secret
80-
api-token: ${{ secrets.XANO_API_TOKEN }}
81-
version: 'latest' # or a specific version like '0.1.1'
82-
# You can specify multiple commands in new lines and the action will execute them in order.
83-
# See the [documentation](/docs/README.md) for command docs.
84-
run: |
85-
generate-oas --all
86-
```
44+
>
45+
> ```
46+
> pnpm link
47+
> ```
48+
>
49+
> **Note:** If you use `pnpm link`, remember to `pnpm unlink --global` when done to avoid version confusion.
50+
51+
! See the [documentation](https://calycode.com/cli/docs) for available commands and arguments.
8752
8853
---
8954
9055
### Xano Registry **(WIP)**
9156
92-
I have been astonished by the shadcn/ui CLI and the core principles of code distribution implemented in that tool. While that is primarily for frontend developers, their attempt to generalise their registry pointed me into the direction where I have started rebuilding a registry system for Xano powered by `xanoscript`. The reason for this is to overcome the bugs of Xano Snippets, avoid dependency of external providers of Xano Actions and in general to allow any team to build their own registries. These registries should also server as guidance for LLMs to eventually start generating more and more reliable `xanoscript`.
57+
I have been astonished by the shadcn/ui CLI and the core principles of code distribution implemented in that tool. While that is primarily for frontend developers, their attempt to generalise their registry pointed me into the direction where I have started rebuilding a registry system for Xano powered by `xanoscript`. The reason for this is to overcome the bugs of Xano Snippets, avoid dependency of external providers of Xano Actions and in general to allow any team to build their own registries with ease. These registries should also serve as guidance for LLMs to eventually start generating more and more reliable `xanoscript`.
9358
9459
<details>
9560
<summary>How to use the registry feature?</summary>
@@ -109,10 +74,10 @@ I have been astonished by the shadcn/ui CLI and the core principles of code dist
10974
xano registry-add --components <coma separated component names> --registry <registry url>
11075
```
11176
112-
> **Notes:**
113-
> Currently there is no way of automatically build out the registry from a collection of `xanoscript` files, so this is why
77+
> [!NOTE] > **Notes:**
78+
> Currently there is no way of automatically building the registry from a collection of `xanoscript` files, so this is why
11479
> it is important to always keep the registry/definitions/index.json and the individual definition files in sync.
115-
> Currently there is theoretic support for registry:function and registry:table components, registry:query but registry:snippet is planned.
80+
> Currently there is theoretic support for registry:function and registry:table components, registry:query but registry:snippet is planned to allow installing multiple items at once in predefined order.
11681
> With the registry:snippet I aim to have a shot at fixing Xano's Snippets and make it searchable and reusable by also LLMs.
11782
11883
</details>
@@ -129,16 +94,15 @@ I have been astonished by the shadcn/ui CLI and the core principles of code dist
12994
## ✔️ What Works Now?
13095
13196
- [x] Allow multi-user multi workspace setup.
132-
- [x] Add context-switching to the configuration options.
133-
- [x] Generate improved **OpenAPI sepcification + Scalar** Reference html (hostable anywhere and viewable locally).
134-
- [x] **Generate code** from the backend API groups, powered by openapi tools generator CLI.
135-
- [x] **Processing Xano** queries, functions, and tables **into a browsable repo** structure
97+
- [x] Generate improved **OpenAPI sepcification + Scalar (as UI)** Reference html (hostable anywhere and viewable locally).
98+
- [x] **Generate code** from the backend API groups, powered by openapi tools generator CLI (orval with tanstack query support is coming).
99+
- [x] **Processing Xano** queries, functions, and tables **into a browsable repo** structure (Xano json, not yet `xanoscript`)
136100
- [x] **Export and restore backups** via Metadata API
101+
- [x] Exporting all available `xanoscript` from your instance via metadata API _\*(important note: not all pieces of logic can be exported via metadata API, this especially is fragile on older and bigger instances)_.
137102
- [x] **Scaffolding a registry** of reusable Xano components
138-
- [x] Exporting all available `xanoscript` from your instance via metadata API _*(important note: not all pieces of logic can be exported via metadata API, this especially is fragile on older and bigger instances)_.
139103
- [x] Adding components to Xano from a registry (only functions, tables, queries for now)
140104
- [x] Automated test runner with assertion configuration
141105
142106
---
143107
144-
**Contributions, feedback, and ideas are welcome!** Open an issue, or reach out to me on [State Change](https://statechange.ai/) or [Snappy Community](https://www.skool.com/@mihaly-toth-2040?g=snappy).
108+
**Contributions, feedback, and ideas are welcome!** Open an issue, or reach out to us on [our Discord](https://mee6.xyz/i/8a9p4ORFtm), on [State Change](https://statechange.ai/) or [Snappy Community](https://www.skool.com/@mihaly-toth-2040?g=snappy).

docs/README.md

Lines changed: 20 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Supercharge your Xano workflow: automate backups, docs, testing, and version con
1717
+==================================================================================================+
1818
```
1919

20-
[📚 **View Full CLI Documentation**](https://calycode.com/cli/docs)
20+
[📚 **View CLI Documentation**](https://calycode.com/cli/docs)
2121

2222
# xano tools
2323

@@ -29,7 +29,7 @@ Supercharge your Xano workflow: automate backups, docs, testing, and version con
2929

3030
---
3131

32-
## 🚀 Quick Start
32+
## 🚀 [Dev] Quick Start
3333

3434
```
3535
# 1. Clone the repo
@@ -38,62 +38,27 @@ Supercharge your Xano workflow: automate backups, docs, testing, and version con
3838
pnpm install
3939
4040
# 3. Build the CLI
41-
pnpm build:packages
41+
pnpm build
4242
4343
# 4. Run any command
4444
xano
4545
```
4646

4747
> _(Optional)_ If you want the CLI globally available during development:
48-
> ```
49-
> pnpm link
50-
> ```
51-
> **Note:** If you use `pnpm link`, remember to `pnpm unlink --global` when done to avoid version confusion.
52-
53-
! See the [documentation](/docs/README.md) for available commands and arguments.
54-
55-
## 🤖 Using in GitHub Actions
56-
57-
You can use this CLI as a GitHub Action to automate your Xano workflows.
58-
59-
Here is an example job that checks out your repository and uses the local composite action (`./dist/actions/master-action.yml`), which in turn securely downloads and runs the Caly-Xano CLI as npm package via the npx command.
60-
61-
```yaml
62-
jobs:
63-
sync:
64-
runs-on: ubuntu-latest
65-
66-
steps:
67-
- uses: actions/checkout@v4
68-
69-
# 1. Setup Node.js and authenticate to the npm registry
70-
- uses: actions/setup-node@v4
71-
with:
72-
node-version: '20'
73-
registry-url: 'https://registry.npmjs.org'
74-
75-
# 2. Use the Xano CLI Action from your repository
76-
# This composite action handles setup and (multiple or single) command execution by calling the published npm package.
77-
- name: Run Caly-Xano Commands
78-
uses: ./dist/actions/master-action.yml
79-
with:
80-
# Xano Instance name, used to identify the created configuration during command execution
81-
instance-name: 'production'
82-
instance-url: ${{ secrets.XANO_URL }}
83-
# Xano Metadata API token. Make sure to set it up as a secret
84-
api-token: ${{ secrets.XANO_API_TOKEN }}
85-
version: 'latest' # or a specific version like '0.1.1'
86-
# You can specify multiple commands in new lines and the action will execute them in order.
87-
# See the [documentation](/docs/README.md) for command docs.
88-
run: |
89-
generate-oas --all
90-
```
48+
>
49+
> ```
50+
> pnpm link
51+
> ```
52+
>
53+
> **Note:** If you use `pnpm link`, remember to `pnpm unlink --global` when done to avoid version confusion.
54+
55+
! See the [documentation](https://calycode.com/cli/docs) for available commands and arguments.
9156
9257
---
9358
9459
### Xano Registry **(WIP)**
9560
96-
I have been astonished by the shadcn/ui CLI and the core principles of code distribution implemented in that tool. While that is primarily for frontend developers, their attempt to generalise their registry pointed me into the direction where I have started rebuilding a registry system for Xano powered by `xanoscript`. The reason for this is to overcome the bugs of Xano Snippets, avoid dependency of external providers of Xano Actions and in general to allow any team to build their own registries. These registries should also server as guidance for LLMs to eventually start generating more and more reliable `xanoscript`.
61+
I have been astonished by the shadcn/ui CLI and the core principles of code distribution implemented in that tool. While that is primarily for frontend developers, their attempt to generalise their registry pointed me into the direction where I have started rebuilding a registry system for Xano powered by `xanoscript`. The reason for this is to overcome the bugs of Xano Snippets, avoid dependency of external providers of Xano Actions and in general to allow any team to build their own registries with ease. These registries should also serve as guidance for LLMs to eventually start generating more and more reliable `xanoscript`.
9762
9863
<details>
9964
<summary>How to use the registry feature?</summary>
@@ -113,10 +78,10 @@ I have been astonished by the shadcn/ui CLI and the core principles of code dist
11378
xano registry-add --components <coma separated component names> --registry <registry url>
11479
```
11580
116-
> **Notes:**
117-
> Currently there is no way of automatically build out the registry from a collection of `xanoscript` files, so this is why
81+
> [!NOTE] > **Notes:**
82+
> Currently there is no way of automatically building the registry from a collection of `xanoscript` files, so this is why
11883
> it is important to always keep the registry/definitions/index.json and the individual definition files in sync.
119-
> Currently there is theoretic support for registry:function and registry:table components, registry:query but registry:snippet is planned.
84+
> Currently there is theoretic support for registry:function and registry:table components, registry:query but registry:snippet is planned to allow installing multiple items at once in predefined order.
12085
> With the registry:snippet I aim to have a shot at fixing Xano's Snippets and make it searchable and reusable by also LLMs.
12186
12287
</details>
@@ -133,19 +98,18 @@ I have been astonished by the shadcn/ui CLI and the core principles of code dist
13398
## ✔️ What Works Now?
13499
135100
- [x] Allow multi-user multi workspace setup.
136-
- [x] Add context-switching to the configuration options.
137-
- [x] Generate improved **OpenAPI sepcification + Scalar** Reference html (hostable anywhere and viewable locally).
138-
- [x] **Generate code** from the backend API groups, powered by openapi tools generator CLI.
139-
- [x] **Processing Xano** queries, functions, and tables **into a browsable repo** structure
101+
- [x] Generate improved **OpenAPI sepcification + Scalar (as UI)** Reference html (hostable anywhere and viewable locally).
102+
- [x] **Generate code** from the backend API groups, powered by openapi tools generator CLI (orval with tanstack query support is coming).
103+
- [x] **Processing Xano** queries, functions, and tables **into a browsable repo** structure (Xano json, not yet `xanoscript`)
140104
- [x] **Export and restore backups** via Metadata API
105+
- [x] Exporting all available `xanoscript` from your instance via metadata API _\*(important note: not all pieces of logic can be exported via metadata API, this especially is fragile on older and bigger instances)_.
141106
- [x] **Scaffolding a registry** of reusable Xano components
142-
- [x] Exporting all available `xanoscript` from your instance via metadata API _*(important note: not all pieces of logic can be exported via metadata API, this especially is fragile on older and bigger instances)_.
143107
- [x] Adding components to Xano from a registry (only functions, tables, queries for now)
144108
- [x] Automated test runner with assertion configuration
145109
146110
---
147111
148-
**Contributions, feedback, and ideas are welcome!** Open an issue, or reach out to me on [State Change](https://statechange.ai/) or [Snappy Community](https://www.skool.com/@mihaly-toth-2040?g=snappy).
112+
**Contributions, feedback, and ideas are welcome!** Open an issue, or reach out to us on [our Discord](https://mee6.xyz/i/8a9p4ORFtm), on [State Change](https://statechange.ai/) or [Snappy Community](https://www.skool.com/@mihaly-toth-2040?g=snappy).
149113
150114
151115
Need further help? Visit [GitHub](https://github.com/calycode/xano-tools) or reach out to Mihály Tóth on [State Change](https://statechange.ai/) or [Snappy Community](https://www.skool.com/@mihaly-toth-2040?g=snappy)

docs/_media/logo.png

-111 KB
Loading

docs/_sidebar.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- Core command
1+
- Core command
22

33
- [xano - the core command](xano.md)
44

@@ -18,11 +18,14 @@
1818
- [`run-test`](commands/run-test.md)
1919
- [`current-context`](commands/current-context.md)
2020

21-
- Changelog
21+
- Changelog
2222

23-
- [CLI](https://github.com/calycode/xano-tools/blob/main/packages/cli/CHANGELOG.md)
24-
- [CORE](https://github.com/calycode/xano-tools/blob/main/packages/core/CHANGELOG.md)
23+
- [CLI](https://github.com/calycode/xano-tools/blob/main/packages/cli/CHANGELOG.md)
24+
- [CORE](https://github.com/calycode/xano-tools/blob/main/packages/core/CHANGELOG.md)
2525

26+
- Community
27+
28+
- [calycode on Discord](https://mee6.xyz/i/8a9p4ORFtm)
2629

2730
<small>For devs with 💖 by devs at [calycode](https://calycode.com).</small>
2831
<small>Documentation powered by [Docsify.js](https://docsifyjs.org)</small>

docs/commands/export-backup.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,12 @@ Usage: xano export-backup [options]
2424
Backup Xano Workspace via Metadata API
2525
2626
Options:
27-
--instance <instance> The instance name. This is used to fetch the instance configuration. The value provided at the setup command.
28-
--workspace <workspace> The workspace name. This is used to fetch the workspace configuration. Same as on Xano interface.
29-
--branch <branch> The branch name. This is used to select the branch configuration. Same as on Xano Interface.
27+
--instance <instance> The instance name. This is used to fetch the instance configuration. The value
28+
provided at the setup command.
29+
--workspace <workspace> The workspace name. This is used to fetch the workspace configuration. Same as on
30+
Xano interface.
31+
--branch <branch> The branch name. This is used to select the branch configuration. Same as on Xano
32+
Interface.
3033
--print-output-dir Expose usable output path for further reuse.
3134
-h, --help display help for command
3235
```

0 commit comments

Comments
 (0)