Try npx @react-native-community/cli config first. If you hit the error below:
path/to/node_modules/.bin/rnc-cli: Permission denied
You can fix it by making the rnc-cli executable.
On mac/linux you can run:
chmod +x /path/to/node_modules/.bin/rnc-cli