Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 32 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
Client Version: 2.0.6
AOS Version: 2.0.4



## Requirements

- [NodeJS](https://nodejs.org) version 20+
Expand Down Expand Up @@ -41,15 +39,14 @@ The aos console is a command-line application that provides an easy to use DX ex

### Setup

Use yarn to build the project and run.
Use npm to build the project and run.

```sh
yarn
yarn build
yarn start
npm install
npm run build
npm start
```


### Command-line options

You can provide a name for a specific Process, if the Process does not exist aos will spawn the process, then every time you run `aos [name]` it will locate that process and interact with it. Alternatively, you can specify a process ID to connect to an existing process with `aos [process-id]`.
Expand All @@ -60,31 +57,31 @@ aos [name/process-id]

#### Flags

| Name | Description | Required |
| --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `--cron [Interval]` | The cron flag can only be used when spawning a process, it instructs the Process to generate messages every `Interval`. An Interval can be defined with a [n]-(period) for example: 1-minute, 10-minutes, 5-hours, 10-blocks, etc. | 0-1 |
| `--get-blueprints [dir]` | This command will grab blueprints from the `/blueprints` folder or a folder specified by the user. These blueprints are small lua files that can be applied to your process to automatically give it some functionality. | 0-1 |
| `--tag-name [name]` and `--tag-value [value]` | These flags are also only when aos is spawning a Process. You may add many of these combinations as you would like and they will appear on the Process tags object | 0-n |
| `--authority [authority]` | The authority flag will allow you to set your authority when spawning a Process. Can be a single address or a comma-separated list. | 0-1 |
| `--load [luaFile]` | The load command allows you to load lua source files from your local directory. | 0-n |
| `--run "<lua code>"` | Evaluate a single Lua command once, print the result, exit without entering the interactive shell, and suppress the splash banner for cleaner stdout. | 0-1 |
| `--hyper` | Combine with `--run` to target hyper-aos without prompting. | 0-1 |
| `--gateway-url [url]` | The gateway-url flag allows you to specify a custom Gateway to connect to. | 0-1 |
| `--cu-url [url]` | The cu-url flag allows you to specify a custom Computer Unit to connect to. | 0-1 |
| `--mu-url [url]` | The mu-url flag allows you to specify a custom Memory Unit to connect to. | 0-1 |
| `--sqlite` | 0-1 | Use sqlite aos module when spawning new process |
| `--data [filepath]` | 0-1 | Set file contents as the data field of your Process. Will run when the process boots up if the On-Boot tag is set to Data, if On-Boot is set to Data make sure the file contains valid lua code |
| Name | Description | Required |
| --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--cron [Interval]` | The cron flag can only be used when spawning a process, it instructs the Process to generate messages every `Interval`. An Interval can be defined with a [n]-(period) for example: 1-minute, 10-minutes, 5-hours, 10-blocks, etc. | 0-1 |
| `--get-blueprints [dir]` | This command will grab blueprints from the `/blueprints` folder or a folder specified by the user. These blueprints are small lua files that can be applied to your process to automatically give it some functionality. | 0-1 |
| `--tag-name [name]` and `--tag-value [value]` | These flags are also only when aos is spawning a Process. You may add many of these combinations as you would like and they will appear on the Process tags object | 0-n |
| `--authority [authority]` | The authority flag will allow you to set your authority when spawning a Process. Can be a single address or a comma-separated list. | 0-1 |
| `--load [luaFile]` | The load command allows you to load lua source files from your local directory. | 0-n |
| `--run "<lua code>"` | Evaluate a single Lua command once, print the result, exit without entering the interactive shell, and suppress the splash banner for cleaner stdout. | 0-1 |
| `--hyper` | Combine with `--run` to target hyper-aos without prompting. | 0-1 |
| `--gateway-url [url]` | The gateway-url flag allows you to specify a custom Gateway to connect to. | 0-1 |
| `--cu-url [url]` | The cu-url flag allows you to specify a custom Computer Unit to connect to. | 0-1 |
| `--mu-url [url]` | The mu-url flag allows you to specify a custom Memory Unit to connect to. | 0-1 |
| `--sqlite` | 0-1 | Use sqlite aos module when spawning new process |
| `--data [filepath]` | 0-1 | Set file contents as the data field of your Process. Will run when the process boots up if the On-Boot tag is set to Data, if On-Boot is set to Data make sure the file contains valid lua code |

### Commands

When running the console, you can type `dot` commands to instruct the console to perform special instructions.

| Command | Description |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `.editor` | This command opens a simple cli editor that you can type on multiple lines, and then you can type `.done` or `.cancel` to exit editor mode. |
| `.load` | This command allows you to load a lua source file from your local directory |
| `.load-blueprint [name]` | This command will grab a lua file from the blueprints directory and load it into your process. |
| `.exit` | This command will exit your console, but you can also do `Ctrl-C` or `Ctrl-D` |
| Command | Description |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `.editor` | This command opens a simple cli editor that you can type on multiple lines, and then you can type `.done` or `.cancel` to exit editor mode. |
| `.load` | This command allows you to load a lua source file from your local directory |
| `.load-blueprint [name]` | This command will grab a lua file from the blueprints directory and load it into your process. |
| `.exit` | This command will exit your console, but you can also do `Ctrl-C` or `Ctrl-D` |

### Boot Loading

Expand Down Expand Up @@ -112,8 +109,8 @@ license, or a traditional OSS license (GPLv3/v2, MIT, etc).

### Requirements

* Docker
* Nodejs
- Docker
- Nodejs

### Setup

Expand Down Expand Up @@ -146,12 +143,11 @@ aos> .update

Will load the current changes into a process. This workflow will allow you to make changes and update the os verify changes. Rinse Repeat.


### Run AOS Tests

```
yarn
yarn test
npm install
npm test
```

### Deploy WASM Module
Expand All @@ -160,7 +156,7 @@ yarn test
> Add keyfile to $HOME/.wallet.json file

```
yarn deploy
npm run deploy
```

### Copy the new module id
Expand All @@ -183,11 +179,9 @@ Update README.md with new Module ID and new Version
```
cd process
docker run -v .:/src p3rmaw3b/aos-sqlite:0.0.0 emcc-lua
yarn
yarn test
yarn deploy-sqlite
npm install
npm test
npm run deploy-sqlite
```

copy module id to package.json and readme


4 changes: 2 additions & 2 deletions bin/aos.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import os from 'node:os'
let __dirname = url.fileURLToPath(new URL('.', import.meta.url))

if (os.platform() === 'win32') {
__dirname = __dirname.replace(/\\/g, "/").replace(/^[A-Za-z]:\//, "/")
__dirname = __dirname.replace(/\\/g, '/').replace(/^[A-Za-z]:\//, '/')
import(__dirname + '../src/index.js')
} else {
import(path.resolve(__dirname + '../src/index.js'))
}
}
16 changes: 9 additions & 7 deletions extensions/weavedrive/build.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const esbuild = require('esbuild')

esbuild.build({
entryPoints: ['src/index.js'],
platform: 'node',
format: 'cjs',
bundle: true,
outfile: 'dist/index.cjs'
}).then(x => console.log('done'))
esbuild
.build({
entryPoints: ['src/index.js'],
platform: 'node',
format: 'cjs',
bundle: true,
outfile: 'dist/index.cjs'
})
.then(x => console.log('done'))
4 changes: 1 addition & 3 deletions extensions/weavedrive/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ getTx takes a arweave txId and returns the transaction headers for that tx

getDataItem takes a L2 or bundled txId and returns the MetaData for that `id`


### getBlock(blockHeight)
### getBlock(blockHeight)

getBlock takes a blockHeight and returns the blockHeight Headers

Expand Down Expand Up @@ -232,4 +231,3 @@ getBlock takes a blockHeight and returns the blockHeight Headers
npm i -g apm-tool
apm publish
```

2 changes: 1 addition & 1 deletion extensions/weavedrive/client/apm.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"installMessage": ""
},
"dependencies": {}
}
}
Loading
Loading