https://github.com/codekidx/xo
create your own CLI with JSON files
https://github.com/codekidx/xo
Last synced: 14 days ago
JSON representation
create your own CLI with JSON files
- Host: GitHub
- URL: https://github.com/codekidx/xo
- Owner: codekidX
- Created: 2024-12-21T08:45:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-16T13:44:26.000Z (over 1 year ago)
- Last Synced: 2025-10-30T01:44:37.236Z (8 months ago)
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# xo - aliasing on steroids
`xo` is a command-line application for managing your projects from anywhere in your terminal by importing projects and adding commands to this app. `xo` becomes your own CLI app which you can customize and add commands for all of your projects. The most time-saving part of this tool is that:
- you can run your commands from any path in your terminal
- you can open your project from any path in your terminal
- you can share xofile with anyone for easy understanding of setup of your project
## Getting started
By default `xo` doesn't see know anything about your workspace. You have to do:
```
xo init
```
which will create a file called `xo.json` with defaults.
Here is an example `xo.json` file which this project uses:
```
{
"name": "xoproject",
"commands": [
{
"name": "run",
"cmd": "go run main.go",
"env": [],
"help": "run the xo project"
},
{
"name": "install",
"cmd": "go build -o xo main.go && sudo mv xo /usr/local/bin/xo && chmod +x /usr/local/bin/xo",
"help": "build and install the xo binary in your PATH"
},
{
"name": "pack",
"cmd": "go build -o xo main.go",
"help": "pack xo binary for release"
}
]
}
```
once you have added your commands you can `import` this project to `xo` by doing:
```
xo import
```
now lets run the info command to see if it got imported:
```
xo ! xoproject
```
the `!` command displays the project details and the `xoproject` after the `!` is the project name. This produces the following output:
```
+---------+----------------------------------------------+
| XO | |
+---------+----------------------------------------------+
| Command | Help |
+---------+----------------------------------------------+
| install | build and install the xo binary in your PATH |
| pack | pack xo binary for release |
| run | run the xo project |
+---------+----------------------------------------------+
```
once you have imported the project you now can run your project from anywhere:
```
xo xoproject run
```
take a look at this [blog post]() for more info on this tool.
## Future of this tool
`xo` will help developers and teams to setup whole workspace with a single command.