Registry / web-framework / cosmology

cosmology

JSON →
library3.0.2jsnpmunverified

Cosmology is a CLI and TypeScript/JavaScript library for building web3 applications on the Osmosis and Cosmos ecosystems. Version 3.0.2 is the latest stable release, with active development and periodic updates. It enables cryptocurrency trades, liquidity pool participation, and staking rewards directly from the command line or programmatically via the @cosmology/core library. Differentiators include tight integration with Cosmos SDK chains and tools like Telescope and osmojs. The package ships TypeScript types for better developer experience.

npm install cosmology
INSTALL
IMPORT
SIG · COSMOLOGY
C
cosmology
web-frameworkjavascriptv3.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CosmologyClient
import { CosmologyClient } from '@cosmology/core'
import { CosmologyClient } from 'cosmology'
The 'cosmology' package is the CLI wrapper; the library is published separately.
default import of Cosmology
import Cosmology from '@cosmology/core'
const Cosmology = require('cosmology')
ESM-only package; avoid require().
types
import type { CosmosConfig } from '@cosmology/core'
import { CosmosConfig } from '@cosmology/core'
Use type import to avoid bundling if only using types.

Installs the global CLI and demonstrates a trade command, then shows how to instantiate the core client to fetch balances.

// Install CLI globally: npm install -g cosmology // Then run: cosmology trade --amount 100 --from mywallet --to cosmos1... // Or use library: import { CosmologyClient } from '@cosmology/core'; const client = new CosmologyClient({ rpcUrl: 'https://rpc.cosmos.network' }); const balances = await client.getBalances('cosmos1...'); console.log(balances);
cosmology --version
Debug
Known issues
breakingcosmology v3 removed support for Node.js <16
fix
Upgrade Node.js to 16 or later.
affects: >=3.0.0
deprecatedThe @cosmology/cli package is now deprecated; use 'cosmology' directly
fix
npm uninstall -g @cosmology/cli && npm install -g cosmology
affects: >=2.0.0
gotchaDefault import from 'cosmology' does not exist; the package only exports a CLI bin
fix
Use the @cosmology/core library for programmatic access.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module '@cosmology/core'
@cosmology/core is not installed as a dependency
fix
npm install @cosmology/core
TypeError: CosmologyClient is not a constructor
Importing from wrong package (cosmology instead of @cosmology/core)
fix
import { CosmologyClient } from '@cosmology/core'
Command not found: cosmology
CLI not installed globally
fix
npm install -g cosmology
Upgrade
Version history
3.0.2latest on npm
Audit
Dependencies
@cosmology/corerequiredCore TS/JS library powering the CLI operations
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
cosmology — npm install cosmology · libregistry