A hyperbeam cli tool
npm install @permaweb/beamA simple cURL clone built with JavaScript that uses the @permaweb/aoconnect package.
``bashClone the repository
git clone https://github.com/yourusername/beam.git
cd beam
Usage
`bash
beam [options]
`$3
-
-X, --request : Request method to use (default: "GET")
- -H, --header : Pass custom header(s) to server (can be used multiple times)
- -d, --data : HTTP POST data
- -o, --output : Write to file instead of stdout
- -v, --verbose: Make the operation more talkative
- -f, --file : Read data from file
- --raw: Display raw response data
- -h, --help: Display help for command
- -V, --version: Output the version number$3
`bash
Simple GET request
beam https://example.comPOST request with data
beam -X POST -H "Content-Type: application/json" -d '{"key":"value"}' https://example.com/apiPOST request with data from file
beam -X POST -H "Content-Type: application/json" -f data.json https://example.com/apiSave response to file
beam https://example.com -o response.txtVerbose mode
beam -v https://example.com
`How it works
The
beam CLI extracts headers from -H flags and data from -d flag, then uses the @permaweb/aoconnect package's request` function to make HTTP requests. It organizes the URL, headers, and other parameters into tags that are compatible with the aoconnect API.MIT