cosmicjs / cosmic-cli Goto Github PK
View Code? Open in Web Editor NEWThe official command line tool for Cosmic
Home Page: https://www.cosmicjs.com
License: MIT License
The official command line tool for Cosmic
Home Page: https://www.cosmicjs.com
License: MIT License
need to add option for json inputs to all commands
Thank you for the tool. Although I just tried it easily, I could connect the bucket well and I got the information of the bucket, but when I use getObject, I will report that data that is not my own is acquired . Thank you.
CLI
npm i cosmic-cli -g
cosmic login (save creds)
cosmic create-user
cosmic add-bucket -slug "bucket-slug" -title "New Test Bucket"
cosmic use-bucket -slug bucket-slug -read_key -write_key (connect to bucket, save)
cosmic add-user -first_name -last_name -email
cosmic install-app app-slug
cosmic add-object-type
cosmic get-object-types
cosmic delete-object-type
cosmic add-object
cosmic get-objects
cosmic get-object
cosmic edit-object
cosmic delete-object
cosmic add-media
cosmic get-media
cosmic delete-media
-d as JSON
-file as JSON file path
Example:
npm i cosmic-cli -g
cosmic
Options
create-user
login
Options
Add-bucket
Bucket
Options
Object-type, object, media, extensions, webhooks
Login command works and returns authenticated. But use-bucket
returns Not authorized
.
Do I have to use the read key or is this a problem with Windows? Token & email is stored in C:\Users\Alexander\.config\configstore\cosmic-cli.json
Is there a way to get a debug print to get more details why it returns 'Not authorized'?
I'm running Windows 10 Pro (64bit).
Here is a screenshot from my console output from cmd.exe with-in VS code:
Tested the cli also in a virtual machine with Ubuntu 16.0.4.3 (64bit) with the same log message - so this is not an issue that's only related to Windows.
was not in original command list, but I figure that was just a mistake. Added the command.
install-app // 1. Are you sure 2. PUT /buckets/:id
start-app // 1. cd in 2. npm start connected to Bucket
// deploy-app
couple subquestions:
cosmic get-buckets // shows available Bucket slugs available to user, needs new endpoint GET /v1/buckets
cosmic get-objects-types -h // remove all flags, they don't do anything for Object Types
cosmic get-objects --type_slug // will use getObjectsByType
cosmic delete-bucket // deletes Bucket
cosmic command-does-not-exist // needs error message, currently returns nothing
Example:
`exec('git clone ' + repo_url + ' ./' + invokedCmd, function(error, stdout, stderr) {`
uses ./
syntax. Might need to bring in path building helper functions, test on a windows.
Just as we discussed, adding a flag like this:
--metafields '[{type:"text", key: "headline", value: "This is AWESOME"}]'
This will need to be on the following commands:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.